Skip to content

Commit 5dbd05d

Browse files
committed
fixup! Use importmulti timestamp when importing watch only keys
Expand comment as suggested by Matt Corallo <[email protected]> in #9108 (comment)
1 parent b78ec3c commit 5dbd05d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/wallet/wallet.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -607,11 +607,13 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface
607607
int64_t nTimeFirstKey;
608608

609609
/**
610-
* Private version of AddWatchOnly method which does not accept a timestamp.
610+
* Private version of AddWatchOnly method which does not accept a
611+
* timestamp, and which will reset the wallet's nTimeFirstKey value to 1 if
612+
* the watch key did not previously have a timestamp associated with it.
611613
* Because this is an inherited virtual method, it is accessible despite
612-
* being marked private, but it is marked private anyway to encourage use of
613-
* the other AddWatchOnly which accepts a timestamp and sets nTimeFirstKey
614-
* more intelligently for more efficient rescans.
614+
* being marked private, but it is marked private anyway to encourage use
615+
* of the other AddWatchOnly which accepts a timestamp and sets
616+
* nTimeFirstKey more intelligently for more efficient rescans.
615617
*/
616618
bool AddWatchOnly(const CScript &dest) override;
617619

0 commit comments

Comments
 (0)