[#wallet-DescriptorScriptPubKeyMan-TopUp]
= xref:wallet.adoc[wallet]::xref:wallet/DescriptorScriptPubKeyMan.adoc[DescriptorScriptPubKeyMan]::TopUp
:relfileprefix: ../../
:mrdocs:

Tops up the descriptor cache and m&lowbar;map&lowbar;script&lowbar;pub&lowbar;keys&period; The cache is stored in the wallet file and is used to expand the descriptor in GetNewDestination&period; Descriptor wallets rely more on ephemeral data than legacy wallets&period; For wallets using unhardened derivation (with or without private keys), the &quot;keypool&quot; is a single xpub&period;

== Synopsis

Declared in `&lt;wallet&sol;scriptpubkeyman&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
virtual
bool
TopUp(unsigned int size = 0) override;
----

== Return Value

true if the cache was successfully topped up&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *size*
| Number of keys to top up to, or 0 to use the configured keypool size&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
