Suggestion for a New RPC Command in Bitcoin Core

1 reply 164 views
Posts: 83 · Reputation: 179
#1Jun 16, 2020, 06:40 AM
So in Bitcoin Core, we can import descriptors and set which index the wallet uses for a new address with commands like getnewaddress. But currently, next_index is used just as an argument for that. Wouldn't it make more sense to have a separate RPC command for this, kinda like keypoolrefill? I mean, right now every new address is shown only once for privacy. But what if you clicked and want a new address but haven’t completed a transaction yet? Seems like a better flow could be achieved with a proper command.
5 Reply Quote Share
matrix2021Full Member
Posts: 92 · Reputation: 612
#2Jun 16, 2020, 07:15 AM
Not quite sure what you mean. You can just use keypoolrefill, right? Why would they need that? Each time a new address pops up, Bitcoin Core updates next_index automatically, so no need to touch newkeypool or keypoolrefill. When importing a descriptor, the next_index helps set it from the get-go. Plus, there’s a range option you can use for your initial keypool size. But that doesn’t cover all cases. Like, you might give an address to someone and then expect a new address for the next transaction before the previous one even gets any action.
6 Reply Quote Share

Related topics