mirror of
https://github.com/monero-project/monero.git
synced 2025-08-11 09:30:14 -04:00
Merge pull request #1924
6d315459
core: avoid possible reordering bugs wth tx/bloch hash cache (moneromooo-monero)
This commit is contained in:
commit
e3d2b135e7
4 changed files with 45 additions and 31 deletions
|
@ -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;
|
||||
}
|
||||
//---------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue