diff options
| author | Antoine Riard <[email protected]> | 2019-12-10 18:08:21 -0500 |
|---|---|---|
| committer | Antoine Riard <[email protected]> | 2019-12-18 13:31:32 -0500 |
| commit | f41d58966995fe69df433fa684117fae74a56e66 (patch) | |
| tree | d33b90c0f525fcead4a12777766da32b60fa0e3a /src/wallet/scriptpubkeyman.h | |
| parent | Merge #17633: tests: Add option --valgrind to run the functional tests under ... (diff) | |
| download | discoin-f41d58966995fe69df433fa684117fae74a56e66.tar.xz discoin-f41d58966995fe69df433fa684117fae74a56e66.zip | |
Document better -keypool as a look-ahead safety mechanism
If after a backup, an address is issued beyond the initial
keypool range and none of the addresses in this range
is seen onchain, if a wallet is restored from backup, even in
case of rescan, funds may be loss due to the look-ahead
buffer not being incremented and so restored wallet not detecting
onchain out-of-range address as derived from its seed.
This scenario is theoretically unavoidable due to the requirement
of the keypool to have a max size. However, given the default
keypool size, this is unlikely. Document better keypool size
implications to avoid user setting a too low value.
Diffstat (limited to 'src/wallet/scriptpubkeyman.h')
| -rw-r--r-- | src/wallet/scriptpubkeyman.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/wallet/scriptpubkeyman.h b/src/wallet/scriptpubkeyman.h index 6ed9a4787..31547ec4d 100644 --- a/src/wallet/scriptpubkeyman.h +++ b/src/wallet/scriptpubkeyman.h @@ -72,6 +72,11 @@ std::vector<CKeyID> GetAffectedKeys(const CScript& spk, const SigningProvider& p * keys (by default 1000) ahead of the last used key and scans for the * addresses of those keys. This avoids the risk of not seeing transactions * involving the wallet's addresses, or of re-using the same address. + * In the unlikely case where none of the addresses in the `gap limit` are + * used on-chain, the look-ahead will not be incremented to keep + * a constant size and addresses beyond this range will not be detected by an + * old backup. For this reason, it is not recommended to decrease keypool size + * lower than default value. * * The HD-split wallet feature added a second keypool (commit: 02592f4c). There * is an external keypool (for addresses to hand out) and an internal keypool |