When importing descriptors with a range less than 1000, it seems to be ignored. Is this deliberate? I could‘t find anything about this in the docs.
To reproduce, first, create an empty wallet:
bitcoin-cli -regtest -named createwallet wallet_name=test disable_private_keys=true blank=true descriptors=true
Import a descriptor with range 10:
bitcoin-cli -regtest -named importdescriptors requests='[{ "desc": "'"wpkh([9a6a2580/84'/1'/179']tpubDCMRAYcH71Gib1rASZpnMPpJbj7S1Nzmao1nPv5Jrb8pwSUimsH5TmK842UhnGPJbiNThzxhK4BpRUCsjSckpNYkH9kjKGWLd94yhZFN94J/0/*)#rljv8npg"'", "timestamp":"now", "active": true, "range":10}]'
Check the range with listdescriptors
:
{
"wallet_name": "test",
"descriptors": [
{
"desc": "wpkh([9a6a2580/84'/1'/179']tpubDCMRAYcH71Gib1rASZpnMPpJbj7S1Nzmao1nPv5Jrb8pwSUimsH5TmK842UhnGPJbiNThzxhK4BpRUCsjSckpNYkH9kjKGWLd94yhZFN94J/0/*)#rljv8npg",
"timestamp": 1666876980,
"active": true,
"internal": false,
"range": [
0,
999
],
"next": 0
}
]
}
In contrast, if I import a descriptor with a range larger than 1000, it seems to be respected:
bitcoin-cli -regtest -named importdescriptors requests='[{ "desc": "'"wpkh([9a6a2580/84'/1'/180']tpubDCMRAYcH71GibuLuWcDkwmmY1gXkXhf162QuEHxkMpZPSi7xck2eGQ6MRGKxNTeY8P1FiFTPCLA5x7qZpFx84fnnrNQFpSnUCwd1nPG8Mk9/0/*)#u49n3vuy"'", "timestamp":"now", "active": true, "range":2000}]'
Check the range again with listdescriptors
:
(…)
{
"desc": "wpkh([9a6a2580/84'/1'/180']tpubDCMRAYcH71GibuLuWcDkwmmY1gXkXhf162QuEHxkMpZPSi7xck2eGQ6MRGKxNTeY8P1FiFTPCLA5x7qZpFx84fnnrNQFpSnUCwd1nPG8Mk9/0/*)#u49n3vuy",
"timestamp": 1666876980,
"active": true,
"internal": false,
"range": [
0,
2000
],
"next": 0
}