HomePhabricator

No longer ever reuse keypool indexes

Description

No longer ever reuse keypool indexes

Summary:
This fixes an issue where you could reserve a keypool entry, then
top up the keypool, writing out a new key at the given index, then
return they key from the pool. This isnt likely to cause issues,
but given there is no reason to ever re-use keypool indexes
(they're 64 bits...), best to avoid it alltogether.

Backport core's PR10795

Depends on D1045

Test Plan:

make check
./test/functional/test_runner.py --extended

Reviewers: #bitcoin_abc, matiu

Reviewed By: #bitcoin_abc, matiu

Subscribers: teamcity

Differential Revision: https://reviews.bitcoinabc.org/D1047

Details

Provenance
Matt Corallo <git@bluematt.me>Authored on Jul 11 2017, 16:15
deadalnixCommitted on Jan 31 2018, 15:38
deadalnixPushed on Jan 31 2018, 15:53
Reviewer
Restricted Project
Differential Revision
D1047: No longer ever reuse keypool indexes
Parents
rSTAGINGef88cd5db0e7: Batch flushing operations to the walletdb during top up and increase keypool…
Branches
Unknown
Tags
Unknown
References
tag: phabricator/base/2781