diff options
| author | Riccardo Spagni <ric@spagni.net> | 2014-09-25 08:24:42 +0200 |
|---|---|---|
| committer | Riccardo Spagni <ric@spagni.net> | 2014-09-25 08:24:42 +0200 |
| commit | 59a8366bb18653f14142321a9d85377ceaef8fad (patch) | |
| tree | bad5d2d8ce4e7fa651b7e03a4e749a823032a0f2 /src/cryptonote_core/cryptonote_core.cpp | |
| parent | 145dc19eebd2c9f289381debfa1fb7a4b8c71ef7 (diff) | |
| download | monzero-core-59a8366bb18653f14142321a9d85377ceaef8fad.tar.gz monzero-core-59a8366bb18653f14142321a9d85377ceaef8fad.tar.xz monzero-core-59a8366bb18653f14142321a9d85377ceaef8fad.zip | |
Revert "low risk, potentially varint overflow bug patched thanks to BBR"
This reverts commit 4e2b2b942daa4206ec44c66e59863670dfe3fde4.
Diffstat (limited to 'src/cryptonote_core/cryptonote_core.cpp')
| -rw-r--r-- | src/cryptonote_core/cryptonote_core.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index e6aa679d7..964d61e2f 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -191,7 +191,7 @@ namespace cryptonote return false; } - bool r = add_new_tx(tx, tx_hash, tx_prefixt_hash, tvc, keeped_by_block); + bool r = add_new_tx(tx, tx_hash, tx_prefixt_hash, tx_blob.size(), tvc, keeped_by_block); if(tvc.m_verifivation_failed) {LOG_PRINT_RED_L1("Transaction verification failed: " << tx_hash);} else if(tvc.m_verifivation_impossible) @@ -284,7 +284,7 @@ namespace cryptonote crypto::hash tx_prefix_hash = get_transaction_prefix_hash(tx); blobdata bl; t_serializable_object_to_blob(tx, bl); - return add_new_tx(tx, tx_hash, tx_prefix_hash, tvc, keeped_by_block); + return add_new_tx(tx, tx_hash, tx_prefix_hash, bl.size(), tvc, keeped_by_block); } //----------------------------------------------------------------------------------------------- size_t core::get_blockchain_total_transactions() @@ -297,7 +297,7 @@ namespace cryptonote // return m_blockchain_storage.get_outs(amount, pkeys); //} //----------------------------------------------------------------------------------------------- - bool core::add_new_tx(const transaction& tx, const crypto::hash& tx_hash, const crypto::hash& tx_prefix_hash, tx_verification_context& tvc, bool keeped_by_block) + bool core::add_new_tx(const transaction& tx, const crypto::hash& tx_hash, const crypto::hash& tx_prefix_hash, size_t blob_size, tx_verification_context& tvc, bool keeped_by_block) { if(m_mempool.have_tx(tx_hash)) { @@ -311,7 +311,7 @@ namespace cryptonote return true; } - return m_mempool.add_tx(tx, tx_hash, tvc, keeped_by_block); + return m_mempool.add_tx(tx, tx_hash, blob_size, tvc, keeped_by_block); } //----------------------------------------------------------------------------------------------- bool core::get_block_template(block& b, const account_public_address& adr, difficulty_type& diffic, uint64_t& height, const blobdata& ex_nonce) |
