diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-03-21 10:30:25 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-03-21 10:30:25 +0000 |
commit | 350e99ae57f07b5ff3dae99277e48821b109bc62 (patch) | |
tree | 7a640ab89d640717d0df80ed691100b080e75eca /src/wallet/wallet2.h | |
parent | Merge pull request #1902 (diff) | |
download | monero-350e99ae57f07b5ff3dae99277e48821b109bc62.tar.xz |
wallet2: cache which pool txes were scanned already
This massively speeds up the wallet updating the pool on mainnet,
where the tx backlog is more than 500 txes.
Diffstat (limited to '')
-rw-r--r-- | src/wallet/wallet2.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h index 5c8d0ae86..9c2e6ddb1 100644 --- a/src/wallet/wallet2.h +++ b/src/wallet/wallet2.h @@ -485,6 +485,10 @@ namespace tools if(ver < 17) return; a & m_unconfirmed_payments; + if(ver < 18) + return; + a & m_scanned_pool_txs[0]; + a & m_scanned_pool_txs[1]; } /*! @@ -677,9 +681,10 @@ namespace tools bool m_confirm_missing_payment_id; bool m_ask_password; NodeRPCProxy m_node_rpc_proxy; + std::unordered_set<crypto::hash> m_scanned_pool_txs[2]; }; } -BOOST_CLASS_VERSION(tools::wallet2, 17) +BOOST_CLASS_VERSION(tools::wallet2, 18) BOOST_CLASS_VERSION(tools::wallet2::transfer_details, 7) BOOST_CLASS_VERSION(tools::wallet2::payment_details, 1) BOOST_CLASS_VERSION(tools::wallet2::unconfirmed_transfer_details, 6) |