HomePhabricator

Save watch only key timestamps when reimporting keys

Description

Save watch only key timestamps when reimporting keys

Summary:
Previously if an existing watch only key was reimported with a new timestamp,
the new timestamp would not be saved in the key metadata, and would not be used
to update the wallet nTimeFirstKey value (which could cause rescanning to start
at the wrong point and miss transactions).

Issue was pointed out by Jonas Schnelli <dev@jonasschnelli.ch> in
https://github.com/bitcoin/bitcoin/pull/9108#issuecomment-279715550

Backport core's PR9818 and PR11483

Test Plan:

make check
./test/functional/test_runner.py importmulti

Reviewers: #bitcoin_abc, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

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

Details

Provenance
Russell Yanofsky <russ@yanofsky.org>Authored on Feb 21 2017, 15:53
deadalnixCommitted on Jan 19 2018, 15:24
schancelPushed on Jan 20 2018, 00:51
Reviewer
Restricted Project
Differential Revision
D976: Save watch only key timestamps when reimporting keys
Parents
rSTAGINGd485139228e3: Remove SingleNodeConnCB
Branches
Unknown
Tags
Unknown