You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
wallet: Introduce a callback called after TopUp completes
After TopUp completes, the wallet containing each SPKM will want to know
what new scriptPubKeys were generated. In order for all TopUp calls
(including ones internal the the SPKM), we use a callback function in
the WalletStorage interface.
Copy file name to clipboardExpand all lines: src/wallet/scriptpubkeyman.cpp
+10Lines changed: 10 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1290,6 +1290,9 @@ bool LegacyScriptPubKeyMan::TopUp(unsigned int kpSize)
1290
1290
}
1291
1291
if (!batch.TxnCommit()) throwstd::runtime_error(strprintf("Error during keypool top up. Cannot commit changes for wallet %s", m_storage.GetDisplayName()));
1292
1292
NotifyCanGetAddressesChanged();
1293
+
// Note: Unlike with DescriptorSPKM, LegacySPKM does not need to call
1294
+
// m_storage.TopUpCallback() as we do not know what new scripts the LegacySPKM is
1295
+
// watching for. CWallet's scriptPubKey cache is not used for LegacySPKMs.
1293
1296
returntrue;
1294
1297
}
1295
1298
@@ -2154,6 +2157,7 @@ bool DescriptorScriptPubKeyMan::TopUp(unsigned int size)
0 commit comments