aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2019-04-06 15:59:43 +0200
committerRiccardo Spagni <ric@spagni.net>2019-04-06 15:59:43 +0200
commit4ac78e1612b193b9e755d40b7c72a8cc287107a9 (patch)
tree6c61a974f9b6c38fbc38b91acd72051c3435ef66 /src/wallet/wallet2.cpp
parentMerge pull request #5345 (diff)
parentcryptonote_basic: some more minor speedups (diff)
downloadmonero-4ac78e1612b193b9e755d40b7c72a8cc287107a9.tar.xz
Merge pull request #5346
c84ea299 cryptonote_basic: some more minor speedups (moneromooo-monero) e40eb2ad cryptonote_basic: speedup calculate_block_hash (moneromooo-monero) 547a9708 cryptonote: block parsing + hash calculation speedup (moneromooo-monero) 11604b6d blockchain: avoid unneeded block copy (moneromooo-monero) 8461df04 save some database calls when getting top block hash and height (moneromooo-monero) 3bbc3661 Avoid repeated (de)serialization when syncing (moneromooo-monero)
Diffstat (limited to 'src/wallet/wallet2.cpp')
-rw-r--r--src/wallet/wallet2.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index e2e07d189..3597ae78f 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -2348,9 +2348,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)