importmulti does not respect the given timestamp #9034

issue jonasschnelli openend this issue on October 27, 2016
  1. jonasschnelli commented at 2:13 pm on October 27, 2016: contributor
    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.
  2. jonasschnelli added the label Wallet on Oct 27, 2016
  3. jonasschnelli added this to the milestone 0.14.0 on Oct 27, 2016
  4. pedrobranco commented at 2:40 pm on October 27, 2016: contributor

    Changing CWallet::AddWatchOnly() to

    0bool AddWatchOnly(const CScript &dest, const int64_t &nTimeKey = 1);
    

    and pass the specific timestamp in ProcessImportMulti() should fix right?

  5. 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).
  6. pedrobranco commented at 2:34 pm on November 2, 2016: contributor

    IMO this issue is not related to the importmulti RPC call but related to CWallet::AddWatchOnly().

    importmulti is 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 WatchOnly objects with nTimeFirstKey = 1, we should not associate importmulti with this wallet issue.

  7. ryanofsky referenced this in commit 6ab4bf13ec on Nov 8, 2016
  8. ryanofsky commented at 10:06 pm on November 8, 2016: member
    Implemented a potential fix for this in #9108.
  9. ryanofsky referenced this in commit 6ec339c0b2 on Nov 10, 2016
  10. ryanofsky referenced this in commit 6a52c4de03 on Nov 10, 2016
  11. ryanofsky referenced this in commit feb0c1d4ab on Dec 19, 2016
  12. ryanofsky referenced this in commit a20a362ed3 on Jan 2, 2017
  13. morcos referenced this in commit a49d23f023 on Jan 23, 2017
  14. ryanofsky referenced this in commit 89011a3032 on Feb 1, 2017
  15. ryanofsky referenced this in commit 3d6dbed2c3 on Feb 2, 2017
  16. ryanofsky referenced this in commit b78ec3cc3d on Feb 2, 2017
  17. ryanofsky referenced this in commit b8fca20399 on Feb 3, 2017
  18. ryanofsky referenced this in commit be820d8ad7 on Feb 6, 2017
  19. ryanofsky referenced this in commit f35ce5172b on Feb 9, 2017
  20. ryanofsky referenced this in commit a80f98b1c7 on Feb 10, 2017
  21. laanwj closed this on Feb 15, 2017

  22. DrahtBot locked this on Sep 8, 2021


jonasschnelli pedrobranco ryanofsky

Labels
Wallet

Milestone
0.14.0


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-10-30 00:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me