mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
Merge pull request #3308
6f8779d2
blockchain: fix random sync failures (moneromooo-monero)
This commit is contained in:
commit
abcdb7b5c4
1 changed files with 4 additions and 1 deletions
|
@ -3564,6 +3564,7 @@ bool Blockchain::add_new_block(const block& bl_, block_verification_context& bvc
|
||||||
LOG_PRINT_L3("block with id = " << id << " already exists");
|
LOG_PRINT_L3("block with id = " << id << " already exists");
|
||||||
bvc.m_already_exists = true;
|
bvc.m_already_exists = true;
|
||||||
m_db->block_txn_stop();
|
m_db->block_txn_stop();
|
||||||
|
m_blocks_txs_check.clear();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3573,7 +3574,9 @@ bool Blockchain::add_new_block(const block& bl_, block_verification_context& bvc
|
||||||
//chain switching or wrong block
|
//chain switching or wrong block
|
||||||
bvc.m_added_to_main_chain = false;
|
bvc.m_added_to_main_chain = false;
|
||||||
m_db->block_txn_stop();
|
m_db->block_txn_stop();
|
||||||
return handle_alternative_block(bl, id, bvc);
|
bool r = handle_alternative_block(bl, id, bvc);
|
||||||
|
m_blocks_txs_check.clear();
|
||||||
|
return r;
|
||||||
//never relay alternative blocks
|
//never relay alternative blocks
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue