aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_basic
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2018-12-12 12:00:50 +0200
committerRiccardo Spagni <ric@spagni.net>2018-12-12 12:00:50 +0200
commit51874e5a401a261e7d868ef81f8f3cad98cd6226 (patch)
tree70d9404ad093aa3cf78cdc063705115f1e459f84 /src/cryptonote_basic
parentMerge pull request #4923 (diff)
parentcryptonote: add a set_null for transaction_prefix (diff)
downloadmonero-51874e5a401a261e7d868ef81f8f3cad98cd6226.tar.xz
Merge pull request #4924
0c5dd316 cryptonote: add a set_null for transaction_prefix (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_basic')
-rw-r--r--src/cryptonote_basic/cryptonote_basic.h17
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);