mirror of
https://github.com/monero-project/monero.git
synced 2025-07-22 11:40:42 -04:00
wallet: do not store signatures in the wallet cache
Saves some substantial space. Also avoid calculating tx hashes we don't need.
This commit is contained in:
parent
0263dd2d23
commit
a47ceee83b
11 changed files with 95 additions and 31 deletions
|
@ -180,7 +180,7 @@ namespace cryptonote
|
|||
FIELD(extra)
|
||||
END_SERIALIZE()
|
||||
|
||||
protected:
|
||||
public:
|
||||
transaction_prefix(){}
|
||||
};
|
||||
|
||||
|
|
|
@ -143,6 +143,16 @@ namespace boost
|
|||
}
|
||||
|
||||
|
||||
template <class Archive>
|
||||
inline void serialize(Archive &a, cryptonote::transaction_prefix &x, const boost::serialization::version_type ver)
|
||||
{
|
||||
a & x.version;
|
||||
a & x.unlock_time;
|
||||
a & x.vin;
|
||||
a & x.vout;
|
||||
a & x.extra;
|
||||
}
|
||||
|
||||
template <class Archive>
|
||||
inline void serialize(Archive &a, cryptonote::transaction &x, const boost::serialization::version_type ver)
|
||||
{
|
||||
|
|
|
@ -321,6 +321,11 @@ namespace cryptonote
|
|||
return pub_key_field.pub_key;
|
||||
}
|
||||
//---------------------------------------------------------------
|
||||
crypto::public_key get_tx_pub_key_from_extra(const transaction_prefix& tx_prefix)
|
||||
{
|
||||
return get_tx_pub_key_from_extra(tx_prefix.extra);
|
||||
}
|
||||
//---------------------------------------------------------------
|
||||
crypto::public_key get_tx_pub_key_from_extra(const transaction& tx)
|
||||
{
|
||||
return get_tx_pub_key_from_extra(tx.extra);
|
||||
|
|
|
@ -89,6 +89,7 @@ namespace cryptonote
|
|||
|
||||
bool parse_tx_extra(const std::vector<uint8_t>& tx_extra, std::vector<tx_extra_field>& tx_extra_fields);
|
||||
crypto::public_key get_tx_pub_key_from_extra(const std::vector<uint8_t>& tx_extra);
|
||||
crypto::public_key get_tx_pub_key_from_extra(const transaction_prefix& tx);
|
||||
crypto::public_key get_tx_pub_key_from_extra(const transaction& tx);
|
||||
bool add_tx_pub_key_to_extra(transaction& tx, const crypto::public_key& tx_pub_key);
|
||||
bool add_extra_nonce_to_tx_extra(std::vector<uint8_t>& tx_extra, const blobdata& extra_nonce);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue