mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-30 03:03:17 +00:00
wallet2: guard against the dameon sending blocks before last checkpoint
This commit is contained in:
parent
eadaa6aaa3
commit
9996d5e96c
1 changed files with 5 additions and 0 deletions
|
@ -1951,6 +1951,11 @@ void wallet2::fast_refresh(uint64_t stop_height, uint64_t &blocks_start_height,
|
||||||
pull_hashes(0, blocks_start_height, short_chain_history, hashes);
|
pull_hashes(0, blocks_start_height, short_chain_history, hashes);
|
||||||
if (hashes.size() <= 3)
|
if (hashes.size() <= 3)
|
||||||
return;
|
return;
|
||||||
|
if (blocks_start_height < m_blockchain.offset())
|
||||||
|
{
|
||||||
|
MERROR("Blocks start before blockchain offset: " << blocks_start_height << " " << m_blockchain.offset());
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (hashes.size() + current_index < stop_height) {
|
if (hashes.size() + current_index < stop_height) {
|
||||||
drop_from_short_history(short_chain_history, 3);
|
drop_from_short_history(short_chain_history, 3);
|
||||||
std::list<crypto::hash>::iterator right = hashes.end();
|
std::list<crypto::hash>::iterator right = hashes.end();
|
||||||
|
|
Loading…
Reference in a new issue