mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-26 21:03:28 +01:00
Use single get_transaction_hash to get both id and blob size
This commit is contained in:
parent
178b009e90
commit
3be518ff40
@ -1642,10 +1642,12 @@ bool blockchain_storage::handle_block_to_main_chain(const block& bl, const crypt
|
||||
bvc.m_verifivation_failed = true;
|
||||
return false;
|
||||
}
|
||||
size_t coinbase_blob_size = get_object_blobsize(bl.miner_tx);
|
||||
crypto::hash coinbase_hash = null_hash;
|
||||
size_t coinbase_blob_size = 0;
|
||||
get_transaction_hash(bl.miner_tx, coinbase_hash, coinbase_blob_size);
|
||||
size_t cumulative_block_size = coinbase_blob_size;
|
||||
//process transactions
|
||||
if(!add_transaction_from_block(bl.miner_tx, get_transaction_hash(bl.miner_tx), id, get_current_blockchain_height()))
|
||||
if(!add_transaction_from_block(bl.miner_tx, coinbase_hash, id, get_current_blockchain_height()))
|
||||
{
|
||||
LOG_PRINT_L1("Block with id: " << id << " failed to add transaction to blockchain storage");
|
||||
bvc.m_verifivation_failed = true;
|
||||
|
Loading…
Reference in New Issue
Block a user