importprivkey RPC call locks the whole client while rescanning #1011

issue davout opened this issue on March 29, 2012
  1. davout commented at 8:19 PM on March 29, 2012: none

    When I import a private key, other JSON-RPC calls seem frozen and return a result only when the private key import JSON-RPC call has finished.

    This makes the feature hardly usable when used in web app or other shared wallet contexts.

    EDIT : Tested on latest master

  2. TheBlueMatt commented at 12:18 AM on March 30, 2012: member

    Currently all RPC calls take both cs_main and pwalletMain->cs_wallet locks, this is true of any rpc call. See https://github.com/bitcoin/bitcoin/blob/master/src/bitcoinrpc.cpp#L2529

  3. weex commented at 6:11 AM on March 30, 2012: none

    A possible way to speed this up, especially for recently generated addresses, would be to allow a parameter to this RPC call that specifies the earliest block to consider in a rescan.

  4. promag commented at 2:58 PM on August 18, 2015: member
  5. unsystemizer commented at 8:38 PM on November 11, 2016: contributor

    Just encountered this on 0.12.1. Following this link it turns out #7551 (merged into master 23 days ago) fixes this by adding the feature mentioned by weex. @davout can you try with 0.13.1 (I think the fix went in before its release)? I can't upgrade my instance yet.

  6. suprnurd referenced this in commit f5738c001f on Dec 5, 2017
  7. laanwj removed the label Priority Low on Dec 6, 2017
  8. fanquake closed this on Mar 6, 2018

  9. ptschip referenced this in commit 2f9ad5b76d on Apr 5, 2018
  10. lateminer referenced this in commit cbc2e54cf9 on Jan 22, 2019
  11. Bushstar referenced this in commit 16a95375ce on Oct 10, 2019
  12. Bushstar referenced this in commit 0d704d3c6a on Oct 10, 2019
  13. lateminer referenced this in commit 49f42e9a59 on Oct 30, 2019
  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: 2026-04-29 03:16 UTC

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