I'm trying to fill my wallet's internal/change address keypool by passing a multisig descriptor to importmulti, but the wallet's internal keypool is 0 before and after running the following shell script:

keypoolinitial=$(bitcoin-cli -testnet getwalletinfo | jq -r '.keypoolsize_hd_internal')
echo "internal keypool initial: $keypoolinitial"


descriptor=$(bitcoin-cli -testnet getdescriptorinfo $rawdescriptor | jq -r '.descriptor')

bitcoin-cli -testnet importmulti '[{"desc": "'$descriptor'", "timestamp": "now", "range": [0, 10], "watchonly": true, "keypool": true, "internal": true}]' >> /dev/null

keypoolfinal=$(bitcoin-cli -testnet getwalletinfo | jq -r '.keypoolsize_hd_internal')
echo "internal keypool final: $keypoolfinal"

Running it gives me:

internal keypool initial: 0
internal keypool final: 0

But the same script works if I change the rawdescriptor line to use a simple P2PKH descriptor such as:


Then it outputs:

internal keypool initial: 0
internal keypool final: 11

1 Answer 1


The keypool (currently) is not an address pool, it does not hold individual addresses, it holds keys. Those keys are then converted to addresses when you want them. Because of this, you cannot import P2SH or P2WSH addresses into the keypool as you are trying to do.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.