mirror of
https://github.com/monero-project/monero.git
synced 2026-07-30 23:50:24 -07:00
cryptonote: block parsing + hash calculation speedup
This saves a duplicate serialization step
This commit is contained in:
@@ -2238,9 +2238,7 @@ void wallet2::get_short_chain_history(std::list<crypto::hash>& ids, uint64_t gra
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
void wallet2::parse_block_round(const cryptonote::blobdata &blob, cryptonote::block &bl, crypto::hash &bl_id, bool &error) const
|
||||
{
|
||||
error = !cryptonote::parse_and_validate_block_from_blob(blob, bl);
|
||||
if (!error)
|
||||
bl_id = get_block_hash(bl);
|
||||
error = !cryptonote::parse_and_validate_block_from_blob(blob, bl, bl_id);
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
void wallet2::pull_blocks(uint64_t start_height, uint64_t &blocks_start_height, const std::list<crypto::hash> &short_chain_history, std::vector<cryptonote::block_complete_entry> &blocks, std::vector<cryptonote::COMMAND_RPC_GET_BLOCKS_FAST::block_output_indices> &o_indices)
|
||||
|
||||
Reference in New Issue
Block a user