fixed a couple of wallet cache issues; fixed rescan_bc bug

This commit is contained in:
Some Random Crypto Guy
2025-09-30 22:01:35 +01:00
parent 419c26adbf
commit 5347266ed9
5 changed files with 70 additions and 38 deletions
+6
View File
@@ -4520,6 +4520,7 @@ bool wallet2::clear()
m_transfers.clear();
m_transfers_indices.clear();
m_locked_coins.clear();
m_salvium_txs.clear();
m_key_images.clear();
m_pub_keys.clear();
m_unconfirmed_txs.clear();
@@ -4538,6 +4539,8 @@ bool wallet2::clear()
m_pool_info_query_time = 0;
m_skip_to_height = 0;
m_background_sync_data = background_sync_data_t{};
m_subaddresses_extended.clear();
m_return_output_info.clear();
return true;
}
//----------------------------------------------------------------------------------------------------
@@ -4547,6 +4550,7 @@ void wallet2::clear_soft(bool keep_key_images)
m_transfers.clear();
m_transfers_indices.clear();
m_locked_coins.clear();
m_salvium_txs.clear();
if (!keep_key_images)
m_key_images.clear();
m_pub_keys.clear();
@@ -4559,6 +4563,8 @@ void wallet2::clear_soft(bool keep_key_images)
m_pool_info_query_time = 0;
m_skip_to_height = 0;
m_background_sync_data = background_sync_data_t{};
m_subaddresses_extended.clear();
m_return_output_info.clear();
cryptonote::block b;
generate_genesis(b);
+8 -4
View File
@@ -1419,8 +1419,6 @@ private:
if (ver < 20)
return;
a & m_subaddresses.parent();
a & m_subaddresses_extended.parent();
a & m_return_output_info.parent();
std::unordered_map<cryptonote::subaddress_index, crypto::public_key> dummy_subaddresses_inv;
a & dummy_subaddresses_inv;
a & m_subaddress_labels;
@@ -1461,9 +1459,13 @@ private:
if(ver < 31)
{
m_background_sync_data = background_sync_data_t{};
m_subaddresses_extended = {};
m_return_output_info = {};
return;
}
a & m_background_sync_data;
a & m_subaddresses_extended.parent();
a & m_return_output_info.parent();
}
BEGIN_SERIALIZE_OBJECT()
@@ -1487,8 +1489,6 @@ private:
FIELD(m_scanned_pool_txs[0])
FIELD(m_scanned_pool_txs[1])
FIELD(m_subaddresses)
FIELD(m_subaddresses_extended)
FIELD(m_return_output_info)
FIELD(m_subaddress_labels)
FIELD(m_additional_tx_keys)
FIELD(m_attributes)
@@ -1508,9 +1508,13 @@ private:
if (version < 2)
{
m_background_sync_data = background_sync_data_t{};
m_subaddresses_extended = {};
m_return_output_info = {};
return true;
}
FIELD(m_background_sync_data)
FIELD(m_subaddresses_extended)
FIELD(m_return_output_info)
END_SERIALIZE()
/*!