mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
blockchain_import: error out if preparing to handle blocks fails
Coverity 197562
This commit is contained in:
parent
5dbcceb664
commit
bea1918a05
1 changed files with 5 additions and 1 deletions
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue