diff --git a/src/cryptonote_core/cryptonote_basic.h b/src/cryptonote_core/cryptonote_basic.h index 2f7a9b7..d72206b 100644 --- a/src/cryptonote_core/cryptonote_basic.h +++ b/src/cryptonote_core/cryptonote_basic.h @@ -141,6 +141,7 @@ namespace cryptonote { public: + enum BLOB_TYPE blob_type; // tx information size_t version; uint64_t unlock_time; //number of block (or time), used as a limitation like: spend this tx not early then block/time @@ -160,13 +161,12 @@ namespace cryptonote protected: - transaction_prefix(){} + transaction_prefix() : blob_type(BLOB_TYPE_CRYPTONOTE) {} }; class transaction: public transaction_prefix { public: - enum BLOB_TYPE blob_type; std::vector > signatures; //count signatures always the same as inputs count rct::rctSig rct_signatures; @@ -235,7 +235,7 @@ namespace cryptonote }; inline - transaction::transaction() : blob_type(BLOB_TYPE_CRYPTONOTE) + transaction::transaction() { set_null(); } diff --git a/src/cryptonote_core/cryptonote_format_utils.cpp b/src/cryptonote_core/cryptonote_format_utils.cpp index fbe2c6b..d66dc5d 100644 --- a/src/cryptonote_core/cryptonote_format_utils.cpp +++ b/src/cryptonote_core/cryptonote_format_utils.cpp @@ -19,7 +19,7 @@ namespace cryptonote void get_transaction_prefix_hash(const transaction_prefix& tx, crypto::hash& h) { std::ostringstream s; - if (t.blob_type == BLOB_TYPE_CRYPTONOTE_RYO) s << "ryo-currency"; + if (tx.blob_type == BLOB_TYPE_CRYPTONOTE_RYO) s << "ryo-currency"; binary_archive a(s); ::serialization::serialize(a, const_cast(tx)); crypto::cn_fast_hash(s.str().data(), s.str().size(), h);