Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge bitcoin#23093: Add ability to flush keypool and always flush wh…
…en upgrading non-HD to HD 6531599 test: Add check that newkeypool flushes change addresses too (Samuel Dobson) 84fa19c Add release notes for keypool flush changes (Samuel Dobson) f9603ee Add test for flushing keypool with newkeypool (Samuel Dobson) 6f6f7bb Make legacy wallet upgrades from non-HD to HD always flush the keypool (Samuel Dobson) 2434b10 Fix outdated keypool size default (Samuel Dobson) 22cc797 Add newkeypool RPC to flush the keypool (Samuel Dobson) Pull request description: This PR makes two main changes: 1) Adds a new RPC `newkeypool` which will entirely flush and refill the keypool. 2) When upgradewallet is called on old, non-HD wallets upgrading them to HD, we now always flush the keypool and generate a new one, to immediately start using the HD generated keys. This PR is motivated by a number of users with old, pre-compressed-key wallets upgrading them and being confused about why they still can't generate p2sh-segwit or bech32 addresses -- this is due to uncompressed keys remaining in the keypool post-upgrade and being illegal in these newer address formats. There is currently no easy way to flush the keypool other than to call `getnewaddress` a hundred/thousand times or an ugly hack of using a `sethdseed` call. ACKs for top commit: laanwj: re-ACK 6531599 meshcollider: Added new commit 6531599 to avoid invalidating previous ACKs. instagibbs: ACK bitcoin@6531599 Tree-SHA512: 50c79c5d42dd27ab0ecdbfdc4071fdaa1b2dbb2f9195ed325b007106ff19226419ce57fe5b1539c0c24101b12f5e034bbcfb7bbb0451b766cb1071295383d774
- Loading branch information