Skip to content

Commit 6e77a7b

Browse files
committed
keypool: Add comment about TopUp and when to use it
1 parent ea50e34 commit 6e77a7b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/wallet/scriptpubkeyman.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ class ScriptPubKeyMan
154154
virtual void KeepDestination(int64_t index) {}
155155
virtual void ReturnDestination(int64_t index, bool internal, const CPubKey& pubkey) {}
156156

157+
/** Fills internal address pool. Use within ScriptPubKeyMan implementations should be used sparingly and only
158+
* when something from the address pool is removed, excluding GetNewDestination and GetReservedDestination.
159+
* External wallet code is primarily responsible for topping up prior to fetching new addresses
160+
*/
157161
virtual bool TopUp(unsigned int size = 0) { return false; }
158162

159163
//! Mark unused addresses as being used

0 commit comments

Comments
 (0)