diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-03-25 13:29:36 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-03-25 13:29:36 +0200 |
commit | e3d2b135e79b1284c07d27f7a23cb334bcfffe84 (patch) | |
tree | c3fd2442f842860a83d212d1d55f204d44c736bb /src/cryptonote_core | |
parent | Merge pull request #1921 (diff) | |
parent | core: avoid possible reordering bugs wth tx/bloch hash cache (diff) | |
download | monero-e3d2b135e79b1284c07d27f7a23cb334bcfffe84.tar.xz |
Merge pull request #1924
6d315459 core: avoid possible reordering bugs wth tx/bloch hash cache (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_core')
-rw-r--r-- | src/cryptonote_core/cryptonote_tx_utils.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cryptonote_core/cryptonote_tx_utils.cpp b/src/cryptonote_core/cryptonote_tx_utils.cpp index 47211ff95..26d5fb767 100644 --- a/src/cryptonote_core/cryptonote_tx_utils.cpp +++ b/src/cryptonote_core/cryptonote_tx_utils.cpp @@ -133,7 +133,7 @@ namespace cryptonote tx.unlock_time = height + CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW; tx.vin.push_back(in); - tx.hash_valid = tx.blob_size_valid = false; + tx.invalidate_hashes(); //LOG_PRINT("MINER_TX generated ok, block_reward=" << print_money(block_reward) << "(" << print_money(block_reward - fee) << "+" << print_money(fee) // << "), current_block_size=" << current_block_size << ", already_generated_coins=" << already_generated_coins << ", tx_id=" << get_transaction_hash(tx), LOG_LEVEL_2); @@ -454,7 +454,7 @@ namespace cryptonote MCINFO("construct_tx", "transaction_created: " << get_transaction_hash(tx) << ENDL << obj_to_json_str(tx) << ENDL); } - tx.hash_valid = tx.blob_size_valid = false; + tx.invalidate_hashes(); return true; } @@ -492,7 +492,7 @@ namespace cryptonote bl.timestamp = 0; bl.nonce = nonce; miner::find_nonce_for_given_block(bl, 1, 0); - bl.hash_valid = false; + bl.invalidate_hashes(); return true; } //--------------------------------------------------------------- |