mirror of
https://github.com/monero-project/monero.git
synced 2024-10-01 11:49:47 -04:00
Merge pull request #5406
bea1918a
blockchain_import: error out if preparing to handle blocks fails (moneromooo-monero)
This commit is contained in:
commit
313a56a2da
@ -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);
|
core.prevalidate_block_hashes(core.get_blockchain_storage().get_db().height(), hashes);
|
||||||
|
|
||||||
std::vector<block> pblocks;
|
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())
|
if (!pblocks.empty() && pblocks.size() != blocks.size())
|
||||||
{
|
{
|
||||||
MERROR("Unexpected parsed blocks size");
|
MERROR("Unexpected parsed blocks size");
|
||||||
|
Loading…
Reference in New Issue
Block a user