RPC: Allow to specify rescan start timestamp for importaddress, importprivkey and importpubkey #13464

pull kristapsk wants to merge 1 commits into bitcoin:master from kristapsk:rescan-from changing 2 files +36 −17
  1. kristapsk commented at 11:26 pm on June 13, 2018: contributor

    You can already do this using importmulti, but importaddress, importprivkey and importpubkey are more easy to use if you are a human being using CLI, not a script.

    Rationale is that I usually know creation date of my private keys when importing, for example, paper wallet. And full blockchain rescans are slow and unnecessary in such cases.

  2. Allow to specify rescan start timestamp
    for importaddress, importprivkey and importpubkey
    c169ab6d30
  3. fanquake added the label RPC/REST/ZMQ on Jun 13, 2018
  4. promag commented at 0:10 am on June 14, 2018: member

    NACK, just create a client command to help with importmulti if that is the problem.

    IMO this is not a strong reason to create redundancy on the RPC server. If this is accepted, clients can import multiple addresses by calling import* multiple times, which would incur in unnecessary rescans. importmulti is tweaked to scan only once for the given the batch.

    Should have tests.

  5. kristapsk commented at 9:26 am on June 14, 2018: contributor

    Yes, if decision is to not merge this, I will just create wrapper scripts for importmulti that will allow partial rescan for importing single privkey or address.

    If this is accepted, clients can import multiple addresses by calling import* multiple times, which would incur in unnecessary rescans.

    It is already possible with full rescans. This PR just adds option to do partial rescan instead.

    Should have tests.

    Will look at tests if this is accepted.

  6. promag commented at 9:34 am on June 14, 2018: member
    @kristapsk please see #6570.
  7. gmaxwell commented at 5:27 pm on June 14, 2018: contributor
    It was my view that these RPCs have largely been deprecated in favor of importmulti.
  8. kristapsk commented at 6:25 pm on June 14, 2018: contributor

    Ok, I didn’t know about that previous discussion. If it has been once discussed to not add this functionality, then no point to do that again.

    Just some additional thoughts:

    1. shouldn’t importaddress, importprivkey and importpubkey output some warnings they are deprecated in favour of importmulti?
    2. shouldn’t “Hint: use importmulti to import more than one private key” help message be altered to add information about additional functionality provided by importmulti in addition to importing multiple keys?

    (that’s anyway different PR then, so I’m closing this)

  9. kristapsk closed this on Jun 14, 2018

  10. laanwj referenced this in commit 452bb90c71 on Jun 25, 2018
  11. PastaPastaPasta referenced this in commit 807fbf3ea8 on Apr 7, 2020
  12. PastaPastaPasta referenced this in commit 6724a1ba64 on Apr 8, 2020
  13. ckti referenced this in commit efe787378e on Mar 28, 2021
  14. MarcoFalke locked this on Sep 8, 2021

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-11-17 18:12 UTC

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