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 commented at 8:18 pm on May 22, 2020: member

    Can be tested with the cli:

    0$ ./src/bitcoin-cli -datadir=/run/media/marco/b_re/TEMP_del//bt gettxoutsetinfo 
    1error code: -9
    2error message:
    3Shutting down
    
  6. fanquake added the label RPC/REST/ZMQ on May 22, 2020
  7. promag commented at 11:06 pm on May 22, 2020: member
    Concept ACK.
  8. hebasto commented at 3:33 am on May 23, 2020: member
    @MarcoFalke mind looking into #17659 ?
  9. hebasto commented at 5:56 pm on May 24, 2020: member
    Concept ACK.
  10. 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:

    0$ git grep --extended-regexp  'GetUTXOStats\([^,]+,[^,]+\)'
    1src/test/fuzz/coins_view.cpp:                (void)GetUTXOStats(&coins_view_cache, stats);
    
  11. 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?
  12. laanwj commented at 10:49 am on May 26, 2020: member
    Code review ACK fa756928c3f455943086051c5fe1d5bb09962248
  13. MarcoFalke merged this on May 26, 2020
  14. MarcoFalke closed this on May 26, 2020

  15. MarcoFalke deleted the branch on May 26, 2020
  16. sidhujag referenced this in commit 407a8be958 on May 27, 2020
  17. MarcoFalke referenced this in commit 834ac4c0f5 on Jul 14, 2020
  18. sidhujag referenced this in commit d67b0940db on Jul 14, 2020
  19. Fabcien referenced this in commit 23bcefb204 on Dec 10, 2020
  20. DrahtBot 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: 2024-07-03 10:13 UTC

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