diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-11-30 14:54:46 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-11-30 15:11:43 +0000 |
commit | 0c5dd3161b0f8c962a77cd27cff58043d85e509c (patch) | |
tree | 468f610c1faabb9fd68af77ee5ebb0eebd9d2400 /src | |
parent | Merge pull request #4821 (diff) | |
download | monero-0c5dd3161b0f8c962a77cd27cff58043d85e509c.tar.xz |
cryptonote: add a set_null for transaction_prefix
Since it's all inline, I suspect the compiler will merge the
duplicate stores anyway.
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); |