When importing a watch-only address over importmulti with a specific timestamp, the wallet's nTimeFirstKey will be set to 1.
I think we should add a optional timestamp to CWallet::AddWatchOnly() and use it when importing addresses or pubkeys.
importmulti does not respect the given timestamp #9034
issue jonasschnelli opened this issue on October 27, 2016-
jonasschnelli commented at 2:13 PM on October 27, 2016: contributor
- jonasschnelli added the label Wallet on Oct 27, 2016
- jonasschnelli added this to the milestone 0.14.0 on Oct 27, 2016
-
pedrobranco commented at 2:40 PM on October 27, 2016: contributor
Changing
CWallet::AddWatchOnly()tobool AddWatchOnly(const CScript &dest, const int64_t &nTimeKey = 1);and pass the specific timestamp in
ProcessImportMulti()should fix right? -
jonasschnelli commented at 8:57 AM on October 28, 2016: contributor
I think this would not be sufficient. IMO the current WatchOnly object (
"watchs"in the database) do not have a corresponding metadata object. First, we should consider adding a metadata objects for those. Second, we need to define how we deal with wallets containing watch-only objects without metadata (probably assume we need to rescan back to genesis in oder to detect related funds, as we do in current master). -
pedrobranco commented at 2:34 PM on November 2, 2016: contributor
IMO this issue is not related to the
importmultiRPC call but related toCWallet::AddWatchOnly().importmultiis only a shortcut for several wallet operations, with an optional timestamp used only for rescan the blockchain from a given timestamp.As the wallet always handles
WatchOnlyobjects withnTimeFirstKey = 1, we should not associateimportmultiwith this wallet issue. - ryanofsky referenced this in commit 6ab4bf13ec on Nov 8, 2016
- ryanofsky referenced this in commit 6ec339c0b2 on Nov 10, 2016
- ryanofsky referenced this in commit 6a52c4de03 on Nov 10, 2016
- ryanofsky referenced this in commit feb0c1d4ab on Dec 19, 2016
- ryanofsky referenced this in commit a20a362ed3 on Jan 2, 2017
- morcos referenced this in commit a49d23f023 on Jan 23, 2017
- ryanofsky referenced this in commit 89011a3032 on Feb 1, 2017
- ryanofsky referenced this in commit 3d6dbed2c3 on Feb 2, 2017
- ryanofsky referenced this in commit b78ec3cc3d on Feb 2, 2017
- ryanofsky referenced this in commit b8fca20399 on Feb 3, 2017
- ryanofsky referenced this in commit be820d8ad7 on Feb 6, 2017
- ryanofsky referenced this in commit f35ce5172b on Feb 9, 2017
- ryanofsky referenced this in commit a80f98b1c7 on Feb 10, 2017
- laanwj closed this on Feb 15, 2017
- DrahtBot locked this on Sep 8, 2021
Milestone
0.14.0