diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-12-13 19:47:47 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-03-25 13:43:17 +0000 |
commit | 547a9708de91c175ceab0ddde93785ba93c9efca (patch) | |
tree | cfaa3baf0447a7e4104c5416c091ffcb539ae5e2 /src/wallet/wallet2.cpp | |
parent | blockchain: avoid unneeded block copy (diff) | |
download | monero-547a9708de91c175ceab0ddde93785ba93c9efca.tar.xz |
cryptonote: block parsing + hash calculation speedup
This saves a duplicate serialization step
Diffstat (limited to 'src/wallet/wallet2.cpp')
-rw-r--r-- | src/wallet/wallet2.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 53388d659..1e7d8bf42 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -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) |