aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_basic/cryptonote_basic.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/cryptonote_basic/cryptonote_basic.h')
-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);