rpc: Early call once CWallet::MarkDirty in import calls #14303

pull promag wants to merge 2 commits into bitcoin:master from promag:2018-09-wallet-mark-dirty changing 3 files +16 −20
  1. promag commented at 11:22 PM on September 23, 2018: member

    This gives a small, but not relevant, performance improvement when calling importmulti RPC since MarkDirty is called only once.

    Note that ImportScript is not atomic: https://github.com/bitcoin/bitcoin/blob/920c090f63f4990bf0f3b3d1a6d3d8a8bcd14ba0/src/wallet/rpcdump.cpp#L227-L242 ie something can fail after a successful AddWatchOnly, which could lead to invalid cached balances. That's why the MarkDirty call is done as early as possible.

  2. promag cross-referenced this on Sep 23, 2018 from issue Import pubkeys when importing p2sh with importmulti by achow101
  3. fanquake added the label Wallet on Sep 23, 2018
  4. fanquake added the label RPC/REST/ZMQ on Sep 23, 2018
  5. DrahtBot commented at 12:08 AM on September 24, 2018: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->Reviewers, this pull request conflicts with the following ones:

    • #14565 (Overhaul importmulti logic by sipa)
    • #14454 (Add SegWit support to importmulti by MeshCollider)
    • #13787 (Test for Windows encoding issue by ken2812221)
    • #9381 (Remove CWalletTx merging logic from AddToWallet by ryanofsky)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  6. promag force-pushed on Sep 24, 2018
  7. DrahtBot cross-referenced this on Sep 24, 2018 from issue Remove CWalletTx merging logic from AddToWallet by ryanofsky
  8. DrahtBot cross-referenced this on Sep 24, 2018 from issue utils: Add fstream wrapper to allow to pass unicode filename on Windows by ken2812221
  9. DrahtBot cross-referenced this on Sep 24, 2018 from issue Test for Windows encoding issue by ken2812221
  10. DrahtBot commented at 5:17 AM on September 28, 2018: contributor

    <!--32850dd3fdea838b4049e64f46995ea2-->

    Coverage Change (pull 14303) Reference (master)
    Lines +0.0339 % 87.0361 %
    Functions +0.1390 % 84.1130 %
    Branches +0.0039 % 51.5451 %
  11. meshcollider commented at 8:52 AM on October 8, 2018: contributor

    Concept ACK

  12. achow101 commented at 1:10 AM on October 9, 2018: member

    utACK 0a1bbf739890408c44dafd96f6643d86d54c2537

  13. DrahtBot cross-referenced this on Oct 10, 2018 from issue Add SegWit support to importmulti by meshcollider
  14. meshcollider commented at 10:51 PM on October 18, 2018: contributor
  15. meshcollider added the label Refactoring on Oct 18, 2018
  16. DrahtBot added the label Needs rebase on Oct 20, 2018
  17. rpc: Early call once CWallet::MarkDirty in import calls 93196eeacc
  18. wallet: Refactor CWallet::MarkDirty to EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) 852f295ea6
  19. promag force-pushed on Oct 20, 2018
  20. promag commented at 10:05 AM on October 20, 2018: member

    Rebased.

  21. DrahtBot removed the label Needs rebase on Oct 20, 2018
  22. DrahtBot cross-referenced this on Oct 24, 2018 from issue rpc: Require solvability in importmulti if importing more than the scriptPubKey by achow101
  23. DrahtBot cross-referenced this on Oct 25, 2018 from issue Overhaul importmulti logic by sipa
  24. DrahtBot added the label Needs rebase on Oct 31, 2018
  25. DrahtBot commented at 5:02 PM on October 31, 2018: contributor

    <!--cf906140f33d8803c4a75a2196329ecb-->Needs rebase

  26. promag closed this on Oct 31, 2018

  27. laanwj removed the label Needs rebase on Oct 24, 2019
  28. bitcoin locked this on Dec 16, 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-05-19 06:54 UTC