diff options
author | Riccardo Spagni <ric@spagni.net> | 2018-12-12 12:00:50 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2018-12-12 12:00:50 +0200 |
commit | 51874e5a401a261e7d868ef81f8f3cad98cd6226 (patch) | |
tree | 70d9404ad093aa3cf78cdc063705115f1e459f84 /src | |
parent | Merge pull request #4923 (diff) | |
parent | cryptonote: add a set_null for transaction_prefix (diff) | |
download | monero-51874e5a401a261e7d868ef81f8f3cad98cd6226.tar.xz |
Merge pull request #4924
0c5dd316 cryptonote: add a set_null for transaction_prefix (moneromooo-monero)
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptonote_basic/cryptonote_basic.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/cryptonote_basic/cryptonote_basic.h b/src/cryptonote_basic/cryptonote_basic.h index b0eabb0aa..645e99f91 100644 --- a/src/cryptonote_basic/cryptonote_basic.h +++ b/src/cryptonote_basic/cryptonote_basic.h @@ -175,7 +175,15 @@ namespace cryptonote END_SERIALIZE() 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 @@ -302,17 +310,12 @@ namespace cryptonote inline transaction::~transaction() { - //set_null(); } inline void transaction::set_null() { - version = 1; - unlock_time = 0; - vin.clear(); - vout.clear(); - extra.clear(); + transaction_prefix::set_null(); signatures.clear(); rct_signatures.type = rct::RCTTypeNull; set_hash_valid(false); |