Make it interruptible, so that shutdown doesn’t block for up to one hour.
Fixes (partially) #13217
Make it interruptible, so that shutdown doesn’t block for up to one hour.
Fixes (partially) #13217
Also, add interruption points to scantxoutset
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
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 = {});
= {}
really needed?
See for example:
0$ git grep --extended-regexp 'GetUTXOStats\([^,]+,[^,]+\)'
1src/test/fuzz/coins_view.cpp: (void)GetUTXOStats(&coins_view_cache, stats);
FindScriptPubKey()
is it a good chance to make it static
?
MarcoFalke
Empact
promag
hebasto
laanwj
Labels
RPC/REST/ZMQ