diff options
author | Riccardo Spagni <ric@spagni.net> | 2019-04-16 22:32:27 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2019-04-16 22:32:27 +0200 |
commit | 313a56a2da3b4ad6c867d26e084a788df311f6e0 (patch) | |
tree | fd630614a114e355e02abc3df809a7218e161da0 | |
parent | Merge pull request #5405 (diff) | |
parent | blockchain_import: error out if preparing to handle blocks fails (diff) | |
download | monero-313a56a2da3b4ad6c867d26e084a788df311f6e0.tar.xz |
Merge pull request #5406
bea1918a blockchain_import: error out if preparing to handle blocks fails (moneromooo-monero)
-rw-r--r-- | src/blockchain_utilities/blockchain_import.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/blockchain_utilities/blockchain_import.cpp b/src/blockchain_utilities/blockchain_import.cpp index 8454595ac..cb9154f29 100644 --- a/src/blockchain_utilities/blockchain_import.cpp +++ b/src/blockchain_utilities/blockchain_import.cpp @@ -194,7 +194,11 @@ int check_flush(cryptonote::core &core, std::vector<block_complete_entry> &block core.prevalidate_block_hashes(core.get_blockchain_storage().get_db().height(), hashes); std::vector<block> pblocks; - core.prepare_handle_incoming_blocks(blocks, pblocks); + if (!core.prepare_handle_incoming_blocks(blocks, pblocks)) + { + MERROR("Failed to prepare to add blocks"); + return 1; + } if (!pblocks.empty() && pblocks.size() != blocks.size()) { MERROR("Unexpected parsed blocks size"); |