low risk, potentially varint overflow bug patched thanks to BBR

This commit is contained in:
Riccardo Spagni
2014-09-24 22:28:25 +02:00
committed by Thomas Winget
parent 5cd77a9f0b
commit 4e2b2b942d
9 changed files with 85 additions and 14 deletions
+4 -4
View File
@@ -191,7 +191,7 @@ namespace cryptonote
return false;
}
bool r = add_new_tx(tx, tx_hash, tx_prefixt_hash, tx_blob.size(), tvc, keeped_by_block);
bool r = add_new_tx(tx, tx_hash, tx_prefixt_hash, 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, bl.size(), tvc, keeped_by_block);
return add_new_tx(tx, tx_hash, tx_prefix_hash, 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, size_t blob_size, 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, 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, blob_size, tvc, keeped_by_block);
return m_mempool.add_tx(tx, tx_hash, 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)