aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.cpp
diff options
context:
space:
mode:
authorAndrew Chow <[email protected]>2019-10-07 14:11:34 -0400
committerAndrew Chow <[email protected]>2019-11-01 22:58:05 -0400
commit7ef47b88e67718766c92d23973742d08436176e0 (patch)
tree33e85f9d2ebcca00a3b000fd9d69e8d2462703d1 /src/wallet/wallet.cpp
parentRefactor: Move RewriteDB code out of CWallet (diff)
downloaddiscoin-7ef47b88e67718766c92d23973742d08436176e0.tar.xz
discoin-7ef47b88e67718766c92d23973742d08436176e0.zip
Refactor: Move GetKeypoolSize code out of CWallet
This commit does not change behavior.
Diffstat (limited to 'src/wallet/wallet.cpp')
-rw-r--r--src/wallet/wallet.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 575ae7e04..3dff6f7d6 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -3027,6 +3027,17 @@ size_t CWallet::KeypoolCountExternalKeys()
return count;
}
+unsigned int CWallet::GetKeyPoolSize() const
+{
+ AssertLockHeld(cs_wallet);
+
+ unsigned int count = 0;
+ if (auto spk_man = m_spk_man.get()) {
+ count += spk_man->GetKeyPoolSize();
+ }
+ return count;
+}
+
bool CWallet::TopUpKeyPool(unsigned int kpSize)
{
bool res = true;