<p><code>newkeypool</code> only applies to wallets which already have a keypool. If it is true, the current keypool will be emptied and filled with keys generated with the new seed. If it is false, then it will not be emptied, but new keys that are added to the keypool will be generated with the new seed.</p>
<p>With a blank wallet, there are no keys in the wallet, so there are also no keys in the keypool. Thus the <code>newkeypool</code> option has no effect on a blank wallet. If you set it to true, the keypool is already empty and it gets filled by keys produced by the new seed. If you set it to false, new keys will be added to the keypool generated from the new seed, and because it is empty, the first key you request from it will be a new key.</p>
<p>You will be able to see the difference if you make a wallet that isn't blank, or if you use <code>sethdseed</code> again.</p>

CC BY-SA 4.0
2021-08-17T18:05:53.133Z
Ok, if you use `sethdseed` again - it has to be a different seed. Just to note for other readers.
tread
CC BY-SA 4.0
2021-08-17T18:32:46.357Z
`sethdseed` can be used without a seed argument and a randomly generated seed will be used.
Ava Chow
CC BY-SA 4.0
2021-08-17T15:56:06.560Z
2021-08-17T15:56:06.560Z
Ava Chow
<p>When I create a new blank wallet and set the seed with both <code>newkeypool</code> as True and False...I do not see a difference in the resulting dumped wallets.</p>
<p>The cli help states:</p>
<pre><code>Arguments:
1. newkeypool    (boolean, optional, default=true) Whether to flush old unused addresses, including change addresses, from the keypool and regenerate it.
                 If true, the next address from getnewaddress and change address from getrawchangeaddress will be from this new seed.
                 If false, addresses (including change addresses if the wallet already had HD Chain Split enabled) from the existing
                 keypool will be used until it has been depleted.
</code></pre>
<blockquote>
<p>I am using <code>testnet</code></p>
</blockquote>
<p>My process:</p>
<pre><code>bitcoin-cli createwallet &quot;mytestwallet&quot; false true
bitcoin-cli -rpcwallet=mytestwallet sethdseed false c...
bitcoin-cli getnewaddress
</code></pre>
<p>Then I delete the wallet <code>rm -R .bitcoin/testnet3/wallets/mytestwallet</code> and recreate with:</p>
<pre><code>bitcoin-cli createwallet &quot;mytestwallet&quot; false true
bitcoin-cli -rpcwallet=mytestwallet sethdseed true c...
bitcoin-cli getnewaddress
</code></pre>
<blockquote>
<p>The resulting new address is the same regardless of the <code>newkeypool</code> boolean</p>
</blockquote>
<blockquote>
<p>The dumpwallet looks the same but the keys and addresses are in difference order...</p>
</blockquote>
<p>Why with bitcoin-core is the address generated after a sethdseed command is the same m/0'/0'/0' whether newkeypool is set to True or False?</p>

<bitcoin-core>
What is the difference between True and False setting of newkeypool variable on the sethdseed command?
tread
# What is the difference between True and False setting of newkeypool variable on the sethdseed command?

(Asked by: username_0 on 2021-08-15)

When I create a new blank wallet and set the seed with both `newkeypool` as True and False...I do not see a difference in the resulting dumped wallets.

The cli help states:

```
Arguments:
1. newkeypool    (boolean, optional, default=true) Whether to flush old unused addresses, including change addresses, from the keypool and regenerate it.
                 If true, the next address from getnewaddress and change address from getrawchangeaddress will be from this new seed.
                 If false, addresses (including change addresses if the wallet already had HD Chain Split enabled) from the existing
                 keypool will be used until it has been depleted.

```

> I am using `testnet`

My process:

```
bitcoin-cli createwallet "mytestwallet" false true
bitcoin-cli -rpcwallet=mytestwallet sethdseed false c...
bitcoin-cli getnewaddress

```

Then I delete the wallet `rm -R .bitcoin/testnet3/wallets/mytestwallet` and recreate with:

```
bitcoin-cli createwallet "mytestwallet" false true
bitcoin-cli -rpcwallet=mytestwallet sethdseed true c...
bitcoin-cli getnewaddress

```

> The resulting new address is the same regardless of the `newkeypool` boolean

> The dumpwallet looks the same but the keys and addresses are in difference order...

Why with bitcoin-core is the address generated after a sethdseed command is the same m/0'/0'/0' whether newkeypool is set to True or False?

**Tags:** bitcoin-core


---

## 1 answers

### Answer by username_1 on 2021-08-17. Score: 2 | Accepted answer

`newkeypool` only applies to wallets which already have a keypool. If it is true, the current keypool will be emptied and filled with keys generated with the new seed. If it is false, then it will not be emptied, but new keys that are added to the keypool will be generated with the new seed.

With a blank wallet, there are no keys in the wallet, so there are also no keys in the keypool. Thus the `newkeypool` option has no effect on a blank wallet. If you set it to true, the keypool is already empty and it gets filled by keys produced by the new seed. If you set it to false, new keys will be added to the keypool generated from the new seed, and because it is empty, the first key you request from it will be a new key.

You will be able to see the difference if you make a wallet that isn't blank, or if you use `sethdseed` again.

> **Comments:**
> **username_0**: Ok, if you use `sethdseed` again - it has to be a different seed. Just to note for other readers.  
> **username_1**: `sethdseed` can be used without a seed argument and a randomly generated seed will be used.  

---

