mirror of
https://github.com/monero-project/monero.git
synced 2024-11-18 00:37:43 +00:00
Merge pull request #3002
9996d5e9
wallet2: guard against the dameon sending blocks before last checkpoint (moneromooo-monero)eadaa6aa
wallet_rpc_server: fix wallet leak on error exit (moneromooo-monero)
This commit is contained in:
commit
990389f09d
2 changed files with 7 additions and 0 deletions
|
@ -2036,6 +2036,11 @@ void wallet2::fast_refresh(uint64_t stop_height, uint64_t &blocks_start_height,
|
|||
pull_hashes(0, blocks_start_height, short_chain_history, hashes);
|
||||
if (hashes.size() <= 3)
|
||||
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) {
|
||||
drop_from_short_history(short_chain_history, 3);
|
||||
std::list<crypto::hash>::iterator right = hashes.end();
|
||||
|
|
|
@ -89,6 +89,8 @@ namespace tools
|
|||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
wallet_rpc_server::~wallet_rpc_server()
|
||||
{
|
||||
if (m_wallet)
|
||||
delete m_wallet;
|
||||
}
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
void wallet_rpc_server::set_wallet(wallet2 *cr)
|
||||
|
|
Loading…
Reference in a new issue