rpc: Make gettxoutsetinfo/GetUTXOStats interruptible #19056

pull MarcoFalke wants to merge 2 commits into bitcoin:master from MarcoFalke:2005-rpcInterrupt changing 5 files +18 −9
  1. MarcoFalke commented at 7:49 PM on May 22, 2020: member

    Make it interruptible, so that shutdown doesn't block for up to one hour.

    Fixes (partially) #13217

  2. rpc: factor out RpcInterruptionPoint from dumptxoutset fa7fc5a8e0
  3. rpc: Make gettxoutsetinfo/GetUTXOStats interruptible
    Also, add interruption points to scantxoutset
    fa756928c3
  4. MarcoFalke force-pushed on May 22, 2020
  5. MarcoFalke cross-referenced this on May 22, 2020 from issue [GUI] QT shutdown is blocked if called before gettxoutsetinfo is finished by ghost
  6. MarcoFalke commented at 8:18 PM on May 22, 2020: member

    Can be tested with the cli:

    $ ./src/bitcoin-cli -datadir=/run/media/marco/b_re/TEMP_del//bt gettxoutsetinfo 
    error code: -9
    error message:
    Shutting down
    
  7. fanquake added the label RPC/REST/ZMQ on May 22, 2020
  8. promag commented at 11:06 PM on May 22, 2020: member

    Concept ACK.

  9. hebasto commented at 3:33 AM on May 23, 2020: member

    @MarcoFalke mind looking into #17659 ?

  10. hebasto commented at 5:56 PM on May 24, 2020: member

    Concept ACK.

  11. christiangirl41 cross-referenced this on May 24, 2020 from issue Pick up "transaction fees in getblock" pull request by MarcoFalke
  12. in src/node/coinstats.h:33 in fa756928c3
      29 | @@ -29,6 +30,6 @@ struct CCoinsStats
      30 |  };
      31 |  
      32 |  //! Calculate statistics about the unspent transaction output set
      33 | -bool GetUTXOStats(CCoinsView* view, CCoinsStats& stats);
      34 | +bool GetUTXOStats(CCoinsView* view, CCoinsStats& stats, const std::function<void()>& interruption_point = {});
    


    hebasto commented at 6:04 PM on May 24, 2020:

    Is default = {} really needed?


    MarcoFalke commented at 10:55 AM on May 26, 2020:

    Yes, otherwise all callers are forced to specify an interruption op


    MarcoFalke commented at 11:37 AM on May 26, 2020:

    See for example:

    $ git grep --extended-regexp  'GetUTXOStats\([^,]+,[^,]+\)'
    src/test/fuzz/coins_view.cpp:                (void)GetUTXOStats(&coins_view_cache, stats);
    
  13. hebasto commented at 6:07 PM on May 24, 2020: member

    While touching the body of FindScriptPubKey() is it a good chance to make it static?

  14. laanwj commented at 10:49 AM on May 26, 2020: member

    Code review ACK fa756928c3f455943086051c5fe1d5bb09962248

  15. MarcoFalke merged this on May 26, 2020
  16. MarcoFalke closed this on May 26, 2020

  17. MarcoFalke deleted the branch on May 26, 2020
  18. sidhujag referenced this in commit 407a8be958 on May 27, 2020
  19. fanquake cross-referenced this on Jun 12, 2020 from issue gui: calling txoutset commands broken in console by fanquake
  20. hebasto cross-referenced this on Jun 18, 2020 from issue gui: Fix regression in *txoutset* in GUI console by hebasto
  21. MarcoFalke referenced this in commit 834ac4c0f5 on Jul 14, 2020
  22. sidhujag referenced this in commit d67b0940db on Jul 14, 2020
  23. Fabcien referenced this in commit 23bcefb204 on Dec 10, 2020
  24. Bushstar cross-referenced this on Sep 9, 2021 from issue Boost usage reduction by Bushstar
  25. Bushstar cross-referenced this on Sep 10, 2021 from issue C++17 and reduce Boost usage by Bushstar
  26. bitcoin locked this on Feb 15, 2022

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-20 06:54 UTC