<ol>
<li>Yes</li>
<li>Yes</li>
<li>Yes</li>
<li>Possibly</li>
<li>By making sure the node does not prune beyond the point the wallet was last loaded. You can either set the prune size large enough that enough blocks remain, or use manual pruning. With manual pruning you can determine how much to prune and when, using the <code>pruneblockchain</code> RPC command.</li>
</ol>

CC BY-SA 4.0
2018-12-23T16:33:53.243Z
Thank you! One last question: after `loadwallet`, how can I tell (via RPC) when the rescan has completed and `getbalance` is reliable?
Bitcoin Hodler
CC BY-SA 4.0
2018-12-23T06:24:47.233Z
2018-12-23T06:24:47.233Z
Pieter Wuille
<p>It's not clear to me how unloaded wallets behave in Bitcoin Core v0.17.0.1.</p>

<p>If I create a new wallet with <code>createwallet</code>, add a receiving address to it using <code>importmulti</code>, then unload it using <code>unloadwallet</code>:</p>

<ol>
<li>Will bitcoind still detect payments to this wallet’s address(es)? (seems yes)</li>
<li>If yes, will that detection happen only when I use <code>loadwallet</code> again? (seems yes)</li>
<li>If yes, will that require a rescan of (recent) blocks? (I'm worried about how long this might take, if it's been months or years since I last loaded this wallet.)</li>
<li>If yes, will that be a problem on a pruned node?</li>
<li>If yes, should I avoid this multi-wallet feature on a pruned node, or is there a safe way to use it without risking large re-downloads? (e.g. never unload it)</li>
</ol>

<bitcoin-core>
Confusion about `unloadwallet`
Bitcoin Hodler
# Confusion about `unloadwallet`

(Asked by: username_0 on 2018-12-23)

It's not clear to me how unloaded wallets behave in username_0 Core v0.17.0.1.

If I create a new wallet with `createwallet`, add a receiving address to it using `importmulti`, then unload it using `unloadwallet`:

1. Will bitcoind still detect payments to this wallet’s address(es)? (seems yes)
2. If yes, will that detection happen only when I use `loadwallet` again? (seems yes)
3. If yes, will that require a rescan of (recent) blocks? (I'm worried about how long this might take, if it's been months or years since I last loaded this wallet.)
4. If yes, will that be a problem on a pruned node?
5. If yes, should I avoid this multi-wallet feature on a pruned node, or is there a safe way to use it without risking large re-downloads? (e.g. never unload it)

**Tags:** bitcoin-core


---

## 1 answers

### Answer by username_1 on 2018-12-23. Score: 3 | Accepted answer

1. Yes
2. Yes
3. Yes
4. Possibly
5. By making sure the node does not prune beyond the point the wallet was last loaded. You can either set the prune size large enough that enough blocks remain, or use manual pruning. With manual pruning you can determine how much to prune and when, using the `pruneblockchain` RPC command.

> **Comments:**
> **username_0**: Thank you! One last question: after `loadwallet`, how can I tell (via RPC) when the rescan has completed and `getbalance` is reliable?  

---

