Batch writes for importmulti

When writing all of the imported data to the wallet, use a common
WalletBatch object so that batch writes are done and the writes
finish more quickly.

AddKeypoolPubkey is no longer needed so it is also removed
This commit is contained in:
Andrew Chow
2019-04-03 18:57:33 -04:00
parent d6576e349e
commit ccb26cf347
3 changed files with 7 additions and 14 deletions

View File

@@ -3372,13 +3372,6 @@ bool CWallet::TopUpKeyPool(unsigned int kpSize)
return true;
}
void CWallet::AddKeypoolPubkey(const CPubKey& pubkey, const bool internal)
{
WalletBatch batch(*database);
AddKeypoolPubkeyWithDB(pubkey, internal, batch);
NotifyCanGetAddressesChanged();
}
void CWallet::AddKeypoolPubkeyWithDB(const CPubKey& pubkey, const bool internal, WalletBatch& batch)
{
LOCK(cs_wallet);