mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-12-01 19:53:12 +00:00
cryptonote: add a set_null for transaction_prefix
Since it's all inline, I suspect the compiler will merge the duplicate stores anyway.
This commit is contained in:
parent
58ce16d4d9
commit
0c5dd3161b
1 changed files with 10 additions and 7 deletions
|
@ -175,7 +175,15 @@ namespace cryptonote
|
||||||
END_SERIALIZE()
|
END_SERIALIZE()
|
||||||
|
|
||||||
public:
|
public:
|
||||||
transaction_prefix(){}
|
transaction_prefix(){ set_null(); }
|
||||||
|
void set_null()
|
||||||
|
{
|
||||||
|
version = 1;
|
||||||
|
unlock_time = 0;
|
||||||
|
vin.clear();
|
||||||
|
vout.clear();
|
||||||
|
extra.clear();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class transaction: public transaction_prefix
|
class transaction: public transaction_prefix
|
||||||
|
@ -302,17 +310,12 @@ namespace cryptonote
|
||||||
inline
|
inline
|
||||||
transaction::~transaction()
|
transaction::~transaction()
|
||||||
{
|
{
|
||||||
//set_null();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline
|
inline
|
||||||
void transaction::set_null()
|
void transaction::set_null()
|
||||||
{
|
{
|
||||||
version = 1;
|
transaction_prefix::set_null();
|
||||||
unlock_time = 0;
|
|
||||||
vin.clear();
|
|
||||||
vout.clear();
|
|
||||||
extra.clear();
|
|
||||||
signatures.clear();
|
signatures.clear();
|
||||||
rct_signatures.type = rct::RCTTypeNull;
|
rct_signatures.type = rct::RCTTypeNull;
|
||||||
set_hash_valid(false);
|
set_hash_valid(false);
|
||||||
|
|
Loading…
Reference in a new issue