Repository: bitcoin/bitcoin (language: cpp)

Issue:
ThreadSanitizer: data race src/flatfile.cpp:47:13 in FlatFileSeq::Open(FlatFilePos const&, bool)
https://cirrus-ci.com/task/6414638208778240?logs=ci#L2908

```
 node2 2024-03-30T00:33:41.792784Z [txindex] [util/thread.cpp:20] [TraceThread] txindex thread start 
 node2 2024-03-30T00:33:41.792859Z [scheduler] [validationinterface.cpp:183] [operator()] [validation] UpdatedBlockTip: new block hash=7883788f39770ef5ae6f0f4ecee37802d50a6f0dacada65d6a8ea02f3af90c3c fork block hash=62b1edabd87390a81142c653e6e6f6543c99c6be5e63f48697d37267c0bf86fe (in IBD=true) 
 node2 2024-03-30T00:33:41.792975Z [scheduler] [validationinterface.cpp:222] [operator()] [validation] MempoolTransactionsRemovedForBlock: block height=398 txs removed=0 
 node2 2024-03-30T00:33:41.793076Z [basic block filter index] [util/thread.cpp:20] [TraceThread] basic block filter index thread start 
 node2 2024-03-30T00:33:41.793139Z [scheduler] [validationinterface.cpp:212] [operator()] [validation] BlockConnected: block hash=74b216909b0a33a9beef910bf3a85e52ba4876a83cc74a657f72c908cf623ad3 block height=398 
 node2 2024-03-30T00:33:41.793226Z [txindex] [index/base.cpp:209] [Sync] txindex is enabled at height 399 
 node2 2024-03-30T00:33:41.793341Z [txindex] [util/thread.cpp:22] [TraceThread] txindex thread exit 
 node2 2024-03-30T00:33:41.793397Z [initload] [util/thread.cpp:22] [TraceThread] initload thread exit 
 node2 2024-03-30T00:33:41.793516Z [coinstatsindex] [util/thread.cpp:20] [TraceThread] coinstatsindex thread start 
 node2 2024-03-30T00:33:41.793821Z [coinstatsindex] [index/base.cpp:209] [Sync] coinstatsindex is enabled at height 399 
 node2 2024-03-30T00:33:41.793850Z [coinstatsindex] [util/thread.cpp:22] [TraceThread] coinstatsindex thread exit 
 node2 2024-03-30T00:33:41.836832Z [http] [httpserver.cpp:306] [http_request_cb] [http] Received a POST request for / from 127.0.0.1:40794 
 test  2024-03-30T00:33:42.739000Z TestFramework (ERROR): Unexpected exception caught during testing 
                                   Traceback (most recent call last):
                                     File "/ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/test_framework/test_framework.py", line 132, in main
                                       self.run_test()
                                     File "/ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/feature_assumeutxo.py", line 419, in run_test
                                       self.restart_node(2, extra_args=[
                                     File "/ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/test_framework/test_framework.py", line 598, in restart_node
                                       self.start_node(i, extra_args)
                                     File "/ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/test_framework/test_framework.py", line 550, in start_node
                                       node.wait_for_rpc_connection()
                                     File "/ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/test_framework/test_node.py", line 255, in wait_for_rpc_connection
                                       raise FailedToStartError(self._node_msg(
                                   test_framework.test_node.FailedToStartError: [node 2] bitcoind exited with status 66 during initialization. ==================
                                   WARNING: ThreadSanitizer: data race (pid=47449)
                                     Read of size 4 at 0x7b4800003b64 by thread T16:
                                       #0 FlatFileSeq::Open(FlatFilePos const&, bool) src/flatfile.cpp:47:13 (bitcoind+0x649c9f) (BuildId: 994f604f928124359e165db86502aa34e11056bc)
                                       #1 BlockFilterIndex::CustomCommit(CDBBatch&) src/index/blockfilterindex.cpp:149:37 (bitcoind+0x687929) (BuildId: 994f604f928124359e165db86502aa34e11056bc)
                                       #2 BaseIndex::Commit() src/index/base.cpp:222:14 (bitcoind+0x67fde7) (BuildId: 994f604f928124359e165db86502aa34e11056bc)
                                       #3 BaseIndex::Sync() src/index/base.cpp:167:17 (bitcoind+0x67f6d0) (BuildId: 994f604f928124359e165db86502aa34e11056bc)
                                       #4 BaseIndex::StartBackgroundSync()::$_0::operator()() const src/index/base.cpp:394:73 (bitcoind+0x6828f5) (BuildId: 994f604f928124359e165db86502aa34e11056bc)
                                       #5 decltype(std::declval<BaseIndex::StartBackgroundSync()::$_0&>()()) std::__1::__invoke[abi:ue170006]<BaseIndex::StartBackgroundSync()::$_0&>(BaseIndex::StartBackgroundSync()::$_0&) /usr/lib/llvm-17/bin/../include/c++/v1/__type_traits/invoke.h:340:25 (bitcoind+0x6828f5)
                                       #6 void std::__1::__invoke_void_return_wrapper<void, true>::__call[abi:ue170006]<BaseIndex::StartBackgroundSync()::$_0&>(BaseIndex::StartBackgroundSync()::$_0&) /usr/lib/llvm-17/bin/../include/c++/v1/__type_traits/invoke.h:415:5 (bitcoind+0x6828f5)
                                       #7 std::__1::__function::__alloc_func<BaseIndex::StartBackgroundSync()::$_0, std::__1::allocator<BaseIndex::StartBackgroundSync()::$_0>, void ()>::operator()[abi:ue170006]() /usr/lib/llvm-17/bin/../include/c++/v1/__functional/function.h:192:16 (bitcoind+0x6828f5)
                                       #8 std::__1::__function::__func<BaseIndex::StartBackgroundSync()::$_0, std::__1::allocator<BaseIndex::StartBackgroundSync()::$_0>, void ()>::operator()() /usr/lib/llvm-17/bin/../include/c++/v1/__functional/function.h:363:12 (bitcoind+0x6828f5)
                                       #9 std::__1::__function::__value_func<void ()>::operator()[abi:ue170006]() const /usr/lib/llvm-17/bin/../include/c++/v1/__functional/function.h:517:16 (bitcoind+0xb3acd5) (BuildId: 994f604f928124359e165db86502aa34e11056bc)
                                       #10 std::__1::function<void ()>::operator()() const /usr/lib/llvm-17/bin/../include/c++/v1/__functional/function.h:1168:12 (bitcoind+0xb3acd5)
                                       #11 util::TraceThread(std::__1::basic_string_view<char, std::__1::char_traits<char>>, std::__1::function<void ()>) src/util/thread.cpp:21:9 (bitcoind+0xb3acd5)
                                       #12 decltype(std::declval<void (*)(std::__1::basic_string_view<char, std::__1::char_traits<char>>, std::__1::function<void ()>)>()(std::declval<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>(), std::declval<BaseIndex::StartBackgroundSync()::$_0>())) std::__1::__invoke[abi:ue170006]<void (*)(std::__1::basic_string_view<char, std::__1::char_traits<char>>, std::__1::function<void ()>), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, BaseIndex::StartBackgroundSync()::$_0>(void (*&&)(std::__1::basic_string_view<char, std::__1::char_traits<char>>, std::__1::function<void ()>), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&&, BaseIndex::StartBackgroundSync()::$_0&&) /usr/lib/llvm-17/bin/../include/c++/v1/__type_traits/invoke.h:340:25 (bitcoind+0x6824a4) (BuildId: 994f604f928124359e165db86502aa34e11056bc)
                                       #13 void std::__1::__thread_execute[abi:ue170006]<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (*)(std::__1::basic_string_view<char, std::__1::char_traits<char>>, std::__1::function<void ()>), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, BaseIndex::StartBackgroundSync()::$_0, 2ul, 3ul>(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (*)(std::__1::basic_string_view<char, std::__1::char_traits<char>>, std::__1::function<void ()>), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, BaseIndex::StartBackgroundSync()::$_0>&, std::__1::__tuple_indices<2ul, 3ul>) /usr/lib/llvm-17/bin/../include/c++/v1/__thread/thread.h:221:5 (bitcoind+0x6824a4)
                                       #14 void* std::__1::__thread_proxy[abi:ue170006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (*)(std::__1::basic_string_view<char, std::__1::char_traits<char>>, std::__1::function<void ()>), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, BaseIndex::StartBackgroundSync()::$_0>>(void*) /usr/lib/llvm-17/bin/../include/c++/v1/__thread/thread.h:232:5 (bitcoind+0x6824a4)
                                     Previous write of size 4 at 0x7b4800003b64 by thread T1:
                                       #0 BlockFilterIndex::Write(BlockFilter const&, unsigned int, uint256 const&) src/index/blockfilterindex.cpp:287:28 (bitcoind+0x68a60a) (BuildId: 994f604f928124359e165db86502aa34e11056bc)
                                       #1 BlockFilterIndex::CustomAppend(interfaces::BlockInfo const&) src/index/blockfilterindex.cpp:267:16 (bitcoind+0x68a101) (BuildId: 994f604f928124359e165db86502aa34e11056bc)
                                       #2 BaseIndex::BlockConnected(ChainstateRole, std::__1::shared_ptr<CBlock const> const&, CBlockIndex const*) src/index/base.cpp:303:9 (bitcoind+0x680ce9) (BuildId: 994f604f928124359e165db86502aa34e11056bc)
                                       #3 ValidationSignals::BlockConnected(ChainstateRole, std::__1::shared_ptr<CBlock const> const&, CBlockIndex const*)::$_0::operator()() const::'lambda'(CValidationInterface&)::operator()(CValidationInterface&) const src/validationinterface.cpp:208:79 (bitcoind+0x5f3607) (BuildId: 994f604f928124359e165db86502aa34e11056bc)
                                       #4 void ValidationSignalsImpl::Iterate<ValidationSignals::BlockConnected(ChainstateRole, std::__1::shared_ptr<CBlock const> const&, CBlockIndex const*)::$_0::operator()() const::'lambda'(CValidationInterface&)>(ValidationSignals::BlockConnected(ChainstateRole, std::__1::shared_ptr<CBlock const> const&, CBlockIndex const*)::$_0::operator()() const::'lambda'(CValidationInterface&)&&) src/validationinterface.cpp:88:17 (bitcoind+0x5f3607)
                                       #5 ValidationSignals::BlockConnected(ChainstateRole, std::__1::shared_ptr<CBlock const> const&, CBlockIndex const*)::$_0::operator()() const src/validationinterface.cpp:208:22 (bitcoind+0x5f3607)
                                       #6 ValidationSignals::BlockConnected(ChainstateRole, std::__1::shared_ptr<CBlock const> const&, CBlockIndex const*)::$_1::operator()() const src/validationinterface.cpp:210:5 (bitcoind+0x5f3607)
                                       #7 decltype(std::declval<ValidationSignals::BlockConnected(ChainstateRole, std::__1::shared_ptr<CBlock const> const&, CBlockIndex const*)::$_1&>()()) std::__1::__invoke[abi:ue170006]<ValidationSignals::BlockConnected(ChainstateRole, std::__1::shared_ptr<CBlock const> const&, CBlockIndex const*)::$_1&>(ValidationSignals::BlockConnected(ChainstateRole, std::__1::shared_ptr<CBlock const> const&, CBlockIndex const*)::$_1&) /usr/lib/llvm-17/bin/../include/c++/v1/__type_traits/invoke.h:340:25 (bitcoind+0x5f3607)
                                       #8 void std::__1::__invoke_void_return_wrapper<void, true>::__call[abi:ue170006]<ValidationSignals::BlockConnected(ChainstateRole, std::__1::shared_ptr<CBlock const> const&, CBlockIndex const*)::$_1&>(ValidationSignals::BlockConnected(ChainstateRole, std::__1::shared_ptr<CBlock const> const&, CBlockIndex const*)::$_1&) /usr/lib/llvm-17/bin/../include/c++/v1/__type_traits/invoke.h:415:5 (bitcoind+0x5f3607)
                                       #9 std::__1::__function::__alloc_func<ValidationSignals::BlockConnected(ChainstateRole, std::__1::shared_ptr<CBlock const> const&, CBlockIndex const*)::$_1, std::__1::allocator<ValidationSignals::BlockConnected(ChainstateRole, std::__1::shared_ptr<CBlock const> const&, CBlockIndex const*)::$_1>, void ()>::operator()[abi:ue170006]() /usr/lib/llvm-17/bin/../include/c++/v1/__functional/function.h:192:16 (bitcoind+0x5f3607)
                                       #10 std::__1::__function::__func<ValidationSignals::BlockConnected(ChainstateRole, std::__1::shared_ptr<CBlock const> const&, CBlockIndex const*)::$_1, std::__1::allocator<ValidationSignals::BlockConnected(ChainstateRole, std::__1::shared_ptr<CBlock const> const&, CBlockIndex const*)::$_1>, void ()>::operator()() /usr/lib/llvm-17/bin/../include/c++/v1/__functional/function.h:363:12 (bitcoind+0x5f3607)
                                       #11 std::__1::__function::__value_func<void ()>::operator()[abi:ue170006]() const /usr/lib/llvm-17/bin/../include/c++/v1/__functional/function.h:517:16 (bitcoind+0xa3adbf) (BuildId: 994f604f928124359e165db86502aa34e11056bc)
                                       #12 std::__1::function<void ()>::operator()() const /usr/lib/llvm-17/bin/../include/c++/v1/__functional/function.h:1168:12 (bitcoind+0xa3adbf)
                                       #13 SerialTaskRunner::ProcessQueue() src/scheduler.cpp:173:5 (bitcoind+0xa3adbf)
                                       #14 SerialTaskRunner::MaybeScheduleProcessQueue()::$_0::operator()() const src/scheduler.cpp:142:41 (bitcoind+0xa3cd15) (BuildId: 994f604f928124359e165db86502aa34e11056bc)
                                       #15 decltype(std::declval<SerialTaskRunner::MaybeScheduleProcessQueue()::$_0&>()()) std::__1::__invoke[abi:ue170006]<SerialTaskRunner::MaybeScheduleProcessQueue()::$_0&>(SerialTaskRunner::MaybeScheduleProcessQueue()::$_0&) /usr/lib/llvm-17/bin/../include/c++/v1/__type_traits/invoke.h:340:25 (bitcoind+0xa3cd15)
                                       #16 void std::__1::__invoke_void_return_wrapper<void, true>::__call[abi:ue170006]<SerialTaskRunner::MaybeScheduleProcessQueue()::$_0&>(SerialTaskRunner::MaybeScheduleProcessQueue()::$_0&) /usr/lib/llvm-17/bin/../include/c++/v1/__type_traits/invoke.h:415:5 (bitcoind+0xa3cd15)
                                       #17 std::__1::__function::__alloc_func<SerialTaskRunner::MaybeScheduleProcessQueue()::$_0, std::__1::allocator<SerialTaskRunner::MaybeScheduleProcessQueue()::$_0>, void ()>::operator()[abi:ue170006]() /usr/lib/llvm-17/bin/../include/c++/v1/__functional/function.h:192:16 (bitcoind+0xa3cd15)
                                       #18 std::__1::__function::__func<SerialTaskRunner::MaybeScheduleProcessQueue()::$_0, std::__1::allocator<SerialTaskRunner::MaybeScheduleProcessQueue()::$_0>, void ()>::operator()() /usr/lib/llvm-17/bin/../include/c++/v1/__functional/function.h:363:12 (bitcoind+0xa3cd15)
                                       #19 std::__1::__function::__value_func<void ()>::operator()[abi:ue170006]() const /usr/lib/llvm-17/bin/../include/c++/v1/__functional/function.h:517:16 (bitcoind+0xa39b64) (BuildId: 994f604f928124359e165db86502aa34e11056bc)
                                       #20 std::__1::function<void ()>::operator()() const /usr/lib/llvm-17/bin/../include/c++/v1/__functional/function.h:1168:12 (bitcoind+0xa39b64)
                                       #21 CScheduler::serviceQueue() src/scheduler.cpp:60:17 (bitcoind+0xa39b64)
                                       #22 AppInitMain(node::NodeContext&, interfaces::BlockAndHeaderTipInfo*)::$_3::operator()() const src/init.cpp:1165:94 (bitcoind+0x1ac325) (BuildId: 994f604f928124359e165db86502aa34e11056bc)
                                       #23 decltype(std::declval<AppInitMain(node::NodeContext&, interfaces::BlockAndHeaderTipInfo*)::$_3&>()()) std::__1::__invoke[abi:ue170006]<AppInitMain(node::NodeContext&, interfaces::BlockAndHeaderTipInfo*)::$_3&>(AppInitMain(node::NodeContext&, interfaces::BlockAndHeaderTipInfo*)::$_3&) /usr/lib/llvm-17/bin/../include/c++/v1/__type_traits/invoke.h:340:25 (bitcoind+0x1ac325)
                                       #24 void std::__1::__invoke_void_return_wrapper<void, true>::__call[abi:ue170006]<AppInitMain(node::NodeContext&, interfaces::BlockAndHeaderTipInfo*)::$_3&>(AppInitMain(node::NodeContext&, interfaces::BlockAndHeaderTipInfo*)::$_3&) /usr/lib/llvm-17/bin/../include/c++/v1/__type_traits/invoke.h:415:5 (bitcoind+0x1ac325)
                                       #25 std::__1::__function::__alloc_func<AppInitMain(node::NodeContext&, interfaces::BlockAndHeaderTipInfo*)::$_3, std::__1::allocator<AppInitMain(node::NodeContext&, interfaces::BlockAndHeaderTipInfo*)::$_3>, void ()>::operator()[abi:ue170006]() /usr/lib/llvm-17/bin/../include/c++/v1/__functional/function.h:192:16 (bitcoind+0x1ac325)
                                       #26 std::__1::__function::__func<AppInitMain(node::NodeContext&, interfaces::BlockAndHeaderTipInfo*)::$_3, std::__1::allocator<AppInitMain(node::NodeContext&, interfaces::BlockAndHeaderTipInfo*)::$_3>, void ()>::operator()() /usr/lib/llvm-17/bin/../include/c++/v1/__functional/function.h:363:12 (bitcoind+0x1ac325)
                                       #27 std::__1::__function::__value_func<void ()>::operator()[abi:ue170006]() const /usr/lib/llvm-17/bin/../include/c++/v1/__functional/function.h:517:16 (bitcoind+0xb3acd5) (BuildId: 994f604f928124359e165db86502aa34e11056bc)
                                       #28 std::__1::function<void ()>::operator()() const /usr/lib/llvm-17/bin/../include/c++/v1/__functional/function.h:1168:12 (bitcoind+0xb3acd5)
                                       #29 util::TraceThread(std::__1::basic_string_view<char, std::__1::char_traits<char>>, std::__1::function<void ()>) src/util/thread.cpp:21:9 (bitcoind+0xb3acd5)
                                       #30 decltype(std::declval<void (*)(std::__1::basic_string_view<char, std::__1::char_traits<char>>, std::__1::function<void ()>)>()(std::declval<char const*>(), std::declval<AppInitMain(node::NodeContext&, interfaces::BlockAndHeaderTipInfo*)::$_3>())) std::__1::__invoke[abi:ue170006]<void (*)(std::__1::basic_string_view<char, std::__1::char_traits<char>>, std::__1::function<void ()>), char const*, AppInitMain(node::NodeContext&, interfaces::BlockAndHeaderTipInfo*)::$_3>(void (*&&)(std::__1::basic_string_view<char, std::__1::char_traits<char>>, std::__1::function<void ()>), char const*&&, AppInitMain(node::NodeContext&, interfaces::BlockAndHeaderTipInfo*)::$_3&&) /usr/lib/llvm-17/bin/../include/c++/v1/__type_traits/invoke.h:340:25 (bitcoind+0x1abf1c) (BuildId: 994f604f928124359e165db86502aa34e11056bc)
                                       #31 void std::__1::__thread_execute[abi:ue170006]<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (*)(std::__1::basic_string_view<char, std::__1::char_traits<char>>, std::__1::function<void ()>), char const*, AppInitMain(node::NodeContext&, interfaces::BlockAndHeaderTipInfo*)::$_3, 2ul, 3ul>(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (*)(std::__1::basic_string_view<char, std::__1::char_traits<char>>, std::__1::function<void ()>), char const*, AppInitMain(node::NodeContext&, interfaces::BlockAndHeaderTipInfo*)::$_3>&, std::__1::__tuple_indices<2ul, 3ul>) /usr/lib/llvm-17/bin/../include/c++/v1/__thread/thread.h:221:5 (bitcoind+0x1abf1c)
                                       #32 void* std::__1::__thread_proxy[abi:ue170006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (*)(std::__1::basic_string_view<char, std::__1::char_traits<char>>, std::__1::function<void ()>), char const*, AppInitMain(node::NodeContext&, interfaces::BlockAndHeaderTipInfo*)::$_3>>(void*) /usr/lib/llvm-17/bin/../include/c++/v1/__thread/thread.h:232:5 (bitcoind+0x1abf1c)
                                     Location is heap block of size 352 at 0x7b4800003a80 allocated by main thread:
                                       #0 operator new(unsigned long) <null> (bitcoind+0x1811ab) (BuildId: 994f604f928124359e165db86502aa34e11056bc)
                                       #1 void* std::__1::__libcpp_operator_new[abi:ue170006]<unsigned long>(unsigned long) /usr/lib/llvm-17/bin/../include/c++/v1/new:268:10 (bitcoind+0x692f8f) (BuildId: 994f604f928124359e165db86502aa34e11056bc)
                                       #2 std::__1::__libcpp_allocate[abi:ue170006](unsigned long, unsigned long) /usr/lib/llvm-17/bin/../include/c++/v1/new:294:10 (bitcoind+0x692f8f)
                                       #3 std::__1::allocator<std::__1::__tree_node<std::__1::__value_type<BlockFilterType, BlockFilterIndex>, void*>>::allocate[abi:ue170006](unsigned long) /usr/lib/llvm-17/bin/../include/c++/v1/__memory/allocator.h:114:38 (bitcoind+0x692f8f)
                                       #4 std::__1::allocator_traits<std::__1::allocator<std::__1::__tree_node<std::__1::__value_type<BlockFilterType, BlockFilterIndex>, void*>>>::allocate[abi:ue170006](std::__1::allocator<std::__1::__tree_node<std::__1::__value_type<BlockFilterType, BlockFilterIndex>, void*>>&, unsigned long) /usr/lib/llvm-17/bin/../include/c++/v1/__memory/allocator_traits.h:268:20 (bitcoind+0x692f8f)
                                       #5 std::__1::unique_ptr<std::__1::__tree_node<std::__1::__value_type<BlockFilterType, BlockFilterIndex>, void*>, std::__1::__tree_node_destructor<std::__1::allocator<std::__1::__tree_node<std::__1::__value_type<BlockFilterType, BlockFilterIndex>, void*>>>> std::__1::__tree<std::__1::__value_type<BlockFilterType, BlockFilterIndex>, std::__1::__map_value_compare<BlockFilterType, std::__1::__value_type<BlockFilterType, BlockFilterIndex>, std::__1::less<BlockFilterType>, true>, std::__1::allocator<std::__1::__value_type<BlockFilterType, BlockFilterIndex>>>::__construct_node<std::__1::piecewise_construct_t const&, std::__1::tuple<BlockFilterType&>, std::__1::tuple<std::__1::unique_ptr<interfaces::Chain, std::__1::default_delete<interfaces::Chain>>&&, BlockFilterType&, unsigned long&, bool&, bool&>>(std::__1::piecewise_construct_t const&, std::__1::tuple<BlockFilterType&>&&, std::__1::tuple<std::__1::unique_ptr<interfaces::Chain, std::__1::default_delete<interfaces::Chain>>&&, BlockFilterType&, unsigned long&, bool&, bool&>&&) /usr/lib/llvm-17/bin/../include/c++/v1/__tree:2143:23 (bitcoind+0x692f8f)
                                       #6 std::__1::pair<std::__1::__tree_iterator<std::__1::__value_type<BlockFilterType, BlockFilterIndex>, std::__1::__tree_node<std::__1::__value_type<BlockFilterType, BlockFilterIndex>, void*>*, long>, bool> std::__1::__tree<std::__1::__value_type<BlockFilterType, BlockFilterIndex>, std::__1::__map_value_compare<BlockFilterType, std::__1::__value_type<BlockFilterType, BlockFilterIndex>, std::__1::less<BlockFilterType>, true>, std::__1::allocator<std::__1::__value_type<BlockFilterType, BlockFilterIndex>>>::__emplace_unique_impl<std::__1::piecewise_construct_t const&, std::__1::tuple<BlockFilterType&>, std::__1::tuple<std::__1::unique_ptr<interfaces::Chain, std::__1::default_delete<interfaces::Chain>>&&, BlockFilterType&, unsigned long&, bool&, bool&>>(std::__1::piecewise_construct_t const&, std::__1::tuple<BlockFilterType&>&&, std::__1::tuple<std::__1::unique_ptr<interfaces::Chain, std::__1::default_delete<interfaces::Chain>>&&, BlockFilterType&, unsigned long&, bool&, bool&>&&) /usr/lib/llvm-17/bin/../include/c++/v1/__tree:2155:25 (bitcoind+0x692d9b) (BuildId: 994f604f928124359e165db86502aa34e11056bc)
                                       #7 std::__1::pair<std::__1::__tree_iterator<std::__1::__value_type<BlockFilterType, BlockFilterIndex>, std::__1::__tree_node<std::__1::__value_type<BlockFilterType, BlockFilterIndex>, void*>*, long>, bool> std::__1::__tree<std::__1::__value_type<BlockFilterType, BlockFilterIndex>, std::__1::__map_value_compare<BlockFilterType, std::__1::__value_type<BlockFilterType, BlockFilterIndex>, std::__1::less<BlockFilterType>, true>, std::__1::allocator<std::__1::__value_type<BlockFilterType, BlockFilterIndex>>>::__emplace_unique[abi:ue170006]<std::__1::piecewise_construct_t const&, std::__1::tuple<BlockFilterType&>, std::__1::tuple<std::__1::unique_ptr<interfaces::Chain, std::__1::default_delete<interfaces::Chain>>&&, BlockFilterType&, unsigned long&, bool&, bool&>>(std::__1::piecewise_construct_t const&, std::__1::tuple<BlockFilterType&>&&, std::__1::tuple<std::__1::unique_ptr<interfaces::Chain, std::__1::default_delete<interfaces::Chain>>&&, BlockFilterType&, unsigned long&, bool&, bool&>&&) /usr/lib/llvm-17/bin/../include/c++/v1/__tree:1200:16 (bitcoind+0x68d833) (BuildId: 994f604f928124359e165db86502aa34e11056bc)
                                       #8 std::__1::pair<std::__1::__map_iterator<std::__1::__tree_iterator<std::__1::__value_type<BlockFilterType, BlockFilterIndex>, std::__1::__tree_node<std::__1::__value_type<BlockFilterType, BlockFilterIndex>, void*>*, long>>, bool> std::__1::map<BlockFilterType, BlockFilterIndex, std::__1::less<BlockFilterType>, std::__1::allocator<std::__1::pair<BlockFilterType const, BlockFilterIndex>>>::emplace[abi:ue170006]<std::__1::piecewise_construct_t const&, std::__1::tuple<BlockFilterType&>, std::__1::tuple<std::__1::unique_ptr<interfaces::Chain, std::__1::default_delete<interfaces::Chain>>&&, BlockFilterType&, unsigned long&, bool&, bool&>>(std::__1::piecewise_construct_t const&, std::__1::tuple<BlockFilterType&>&&, std::__1::tuple<std::__1::unique_ptr<interfaces::Chain, std::__1::default_delete<interfaces::Chain>>&&, BlockFilterType&, unsigned long&, bool&, bool&>&&) /usr/lib/llvm-17/bin/../include/c++/v1/map:1288:24 (bitcoind+0x68d833)
                                       #9 InitBlockFilterIndex(std::__1::function<std::__1::unique_ptr<interfaces::Chain, std::__1::default_delete<interfaces::Chain>> ()>, BlockFilterType, unsigned long, bool, bool) src/index/blockfilterindex.cpp:510:36 (bitcoind+0x68d833)
                                       #10 AppInitMain(node::NodeContext&, interfaces::BlockAndHeaderTipInfo*) src/init.cpp:1651:9 (bitcoind+0x1a15e7) (BuildId: 994f604f928124359e165db86502aa34e11056bc)
                                       #11 AppInit(node::NodeContext&) src/bitcoind.cpp:228:43 (bitcoind+0x18308d) (BuildId: 994f604f928124359e165db86502aa34e11056bc)
                                       #12 main src/bitcoind.cpp:274:10 (bitcoind+0x18308d)
                                     Thread T16 'b-basic block f' (tid=47534, running) created by thread T11 at:
                                       #0 pthread_create <null> (bitcoind+0xf7f4f) (BuildId: 994f604f928124359e165db86502aa34e11056bc)
                                       #1 std::__1::__libcpp_thread_create[abi:ue170006](unsigned long*, void* (*)(void*), void*) /usr/lib/llvm-17/bin/../include/c++/v1/__threading_support:371:10 (bitcoind+0x682034) (BuildId: 994f604f928124359e165db86502aa34e11056bc)
                                       #2 std::__1::thread::thread<void (*)(std::__1::basic_string_view<char, std::__1::char_traits<char>>, std::__1::function<void ()>), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, BaseIndex::StartBackgroundSync()::$_0, void>(void (*&&)(std::__1::basic_string_view<char, std::__1::char_traits<char>>, std::__1::function<void ()>), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, BaseIndex::StartBackgroundSync()::$_0&&) /usr/lib/llvm-17/bin/../include/c++/v1/__thread/thread.h:248:16 (bitcoind+0x682034)
                                       #3 BaseIndex::StartBackgroundSync() src/index/base.cpp:394:21 (bitcoind+0x682034)
                                       #4 StartIndexBackgroundSync(node::NodeContext&) src/init.cpp:2033:49 (bitcoind+0x1ab2df) (BuildId: 994f604f928124359e165db86502aa34e11056bc)
                                       #5 AppInitMain(node::NodeContext&, interfaces::BlockAndHeaderTipInfo*)::$_14::operator()() const src/init.cpp:1758:14 (bitcoind+0x1af5c5) (BuildId: 994f604f928124359e165db86502aa34e11056bc)
                                       #6 decltype(std::declval<AppInitMain(node::NodeContext&, interfaces::BlockAndHeaderTipInfo*)::$_14&>()()) std::__1::__invoke[abi:ue170006]<AppInitMain(node::NodeContext&, interfaces::BlockAndHeaderTipInfo*)::$_14&>(AppInitMain(node::NodeContext&, interfaces::BlockAndHeaderTipInfo*)::$_14&) /usr/lib/llvm-17/bin/../include/c++/v1/__type_traits/invoke.h:340:25 (bitcoind+0x1af5c5)
                                       #7 void std::__1::__invoke_void_return_wrapper<void, true>::__call[abi:ue170006]<AppInitMain(node::NodeContext&, interfaces::BlockAndHeaderTipInfo*)::$_14&>(AppInitMain(node::NodeContext&, interfaces::BlockAndHeaderTipInfo*)::$_14&) /usr/lib/llvm-17/bin/../include/c++/v1/__type_traits/invoke.h:415:5 (bitcoind+0x1af5c5)
                                       #8 std::__1::__function::__alloc_func<AppInitMain(node::NodeContext&, interfaces::BlockAndHeaderTipInfo*)::$_14, std::__1::allocator<AppInitMain(node::NodeContext&, interfaces::BlockAndHeaderTipInfo*)::$_14>, void ()>::operator()[abi:ue170006]() /usr/lib/llvm-17/bin/../include/c++/v1/__functional/function.h:192:16 (bitcoind+0x1af5c5)
                                       #9 std::__1::__function::__func<AppInitMain(node::NodeContext&, interfaces::BlockAndHeaderTipInfo*)::$_14, std::__1::allocator<AppInitMain(node::NodeContext&, interfaces::BlockAndHeaderTipInfo*)::$_14>, void ()>::operator()() /usr/lib/llvm-17/bin/../include/c++/v1/__functional/function.h:363:12 (bitcoind+0x1af5c5)
                                       #10 std::__1::__function::__value_func<void ()>::operator()[abi:ue170006]() const /usr/lib/llvm-17/bin/../include/c++/v1/__functional/function.h:517:16 (bitcoind+0xb3acd5) (BuildId: 994f604f928124359e165db86502aa34e11056bc)
                                       #11 std::__1::function<void ()>::operator()() const /usr/lib/llvm-17/bin/../include/c++/v1/__functional/function.h:1168:12 (bitcoind+0xb3acd5)
                                       #12 util::TraceThread(std::__1::basic_string_view<char, std::__1::char_traits<char>>, std::__1::function<void ()>) src/util/thread.cpp:21:9 (bitcoind+0xb3acd5)
                                       #13 decltype(std::declval<void (*)(std::__1::basic_string_view<char, std::__1::char_traits<char>>, std::__1::function<void ()>)>()(std::declval<char const*>(), std::declval<AppInitMain(node::NodeContext&, interfaces::BlockAndHeaderTipInfo*)::$_14>())) std::__1::__invoke[abi:ue170006]<void (*)(std::__1::basic_string_view<char, std::__1::char_traits<char>>, std::__1::function<void ()>), char const*, AppInitMain(node::NodeContext&, interfaces::BlockAndHeaderTipInfo*)::$_14>(void (*&&)(std::__1::basic_string_view<char, std::__1::char_traits<char>>, std::__1::function<void ()>), char const*&&, AppInitMain(node::NodeContext&, interfaces::BlockAndHeaderTipInfo*)::$_14&&) /usr/lib/llvm-17/bin/../include/c++/v1/__type_traits/invoke.h:340:25 (bitcoind+0x1aead2) (BuildId: 994f604f928124359e165db86502aa34e11056bc)
                                       #14 void std::__1::__thread_execute[abi:ue170006]<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (*)(std::__1::basic_string_view<char, std::__1::char_traits<char>>, std::__1::function<void ()>), char const*, AppInitMain(node::NodeContext&, interfaces::BlockAndHeaderTipInfo*)::$_14, 2ul, 3ul>(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (*)(std::__1::basic_string_view<char, std::__1::char_traits<char>>, std::__1::function<void ()>), char const*, AppInitMain(node::NodeContext&, interfaces::BlockAndHeaderTipInfo*)::$_14>&, std::__1::__tuple_indices<2ul, 3ul>) /usr/lib/llvm-17/bin/../include/c++/v1/__thread/thread.h:221:5 (bitcoind+0x1aead2)
                                       #15 void* std::__1::__thread_proxy[abi:ue170006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (*)(std::__1::basic_string_view<char, std::__1::char_traits<char>>, std::__1::function<void ()>), char const*, AppInitMain(node::NodeContext&, interfaces::BlockAndHeaderTipInfo*)::$_14>>(void*) /usr/lib/llvm-17/bin/../include/c++/v1/__thread/thread.h:232:5 (bitcoind+0x1aead2)
                                     Thread T1 'b-scheduler' (tid=47456, running) created by main thread at:
                                       #0 pthread_create <null> (bitcoind+0xf7f4f) (BuildId: 994f604f928124359e165db86502aa34e11056bc)
                                       #1 std::__1::__libcpp_thread_create[abi:ue170006](unsigned long*, void* (*)(void*), void*) /usr/lib/llvm-17/bin/../include/c++/v1/__threading_support:371:10 (bitcoind+0x19c9fa) (BuildId: 994f604f928124359e165db86502aa34e11056bc)
                                       #2 std::__1::thread::thread<void (&)(std::__1::basic_string_view<char, std::__1::char_traits<char>>, std::__1::function<void ()>), char const (&) [10], AppInitMain(node::NodeContext&, interfaces::BlockAndHeaderTipInfo*)::$_3, void>(void (&)(std::__1::basic_string_view<char, std::__1::char_traits<char>>, std::__1::function<void ()>), char const (&) [10], AppInitMain(node::NodeContext&, interfaces::BlockAndHeaderTipInfo*)::$_3&&) /usr/lib/llvm-17/bin/../include/c++/v1/__thread/thread.h:248:16 (bitcoind+0x19c9fa)
                                       #3 AppInitMain(node::NodeContext&, interfaces::BlockAndHeaderTipInfo*) src/init.cpp:1165:34 (bitcoind+0x19c9fa)
                                       #4 AppInit(node::NodeContext&) src/bitcoind.cpp:228:43 (bitcoind+0x18308d) (BuildId: 994f604f928124359e165db86502aa34e11056bc)
                                       #5 main src/bitcoind.cpp:274:10 (bitcoind+0x18308d)
                                   SUMMARY: ThreadSanitizer: data race src/flatfile.cpp:47:13 in FlatFileSeq::Open(FlatFilePos const&, bool)
                                   ==================
                                   ************************
qt: Windows build with DEBUG=1 is broken
If you try and cross-compile for Windows using master (d04324a7056a735c1127ba8ccdc720a16e7281a3) `DEBUG=1`, it fails. This is on a Ubuntu Noble machine, with `x86_64-w64-mingw32-g++ (GCC) 13-win32`. Noticed in #29527.
```bash
make -C depends HOST=x86_64-w64-mingw32 DEBUG=1 -j17
<snip>
Checking for STL compatibility... 
+ cd /root/ci_scratch/depends/work/build/x86_64-w64-mingw32/qt/5.15.11-8c515c34c2a/config.tests/stl && PKG_CONFIG_SYSROOT_DIR=/ PKG_CONFIG_LIBDIR=/root/ci_scratch/depends/x86_64-w64-mingw32/lib/pkgconfig /root/ci_scratch/depends/work/build/x86_64-w64-mingw32/qt/5.15.11-8c515c34c2a/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += static warn_off console single_arch" 'QMAKE_CFLAGS = '\''-pipe -std=c11 -O1 -g  -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -I/root/ci_scratch/depends/x86_64-w64-mingw32/include'\''' 'QMAKE_CXX = '\''x86_64-w64-mingw32-g++-posix'\''' 'QMAKE_CXXFLAGS = '\''-pipe -std=c++20 -O1 -g  -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -I/root/ci_scratch/depends/x86_64-w64-mingw32/include'\''' 'QMAKE_LFLAGS = '\''  -L/root/ci_scratch/depends/x86_64-w64-mingw32/lib'\''' 'QMAKE_LIB = '\''x86_64-w64-mingw32-ar rc'\''' -early "CONFIG += cross_compile" /root/ci_scratch/depends/work/build/x86_64-w64-mingw32/qt/5.15.11-8c515c34c2a/qtbase/config.tests/stl
+ cd /root/ci_scratch/depends/work/build/x86_64-w64-mingw32/qt/5.15.11-8c515c34c2a/config.tests/stl && MAKEFLAGS= /usr/bin/gmake
> gmake[1]: Entering directory '/root/ci_scratch/depends/work/build/x86_64-w64-mingw32/qt/5.15.11-8c515c34c2a/config.tests/stl'
> x86_64-w64-mingw32-g++-posix -c -pipe -std=c++20 -O1 -g  -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -I/root/ci_scratch/depends/x86_64-w64-mingw32/include -O2 -w -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -I/root/ci_scratch/depends/work/build/x86_64-w64-mingw32/qt/5.15.11-8c515c34c2a/qtbase/config.tests/stl -I. -I/root/ci_scratch/depends/work/build/x86_64-w64-mingw32/qt/5.15.11-8c515c34c2a/qtbase/mkspecs/win32-g++  -o stltest.o /root/ci_scratch/depends/work/build/x86_64-w64-mingw32/qt/5.15.11-8c515c34c2a/qtbase/config.tests/stl/stltest.cpp
> x86_64-w64-mingw32-g++ -L/root/ci_scratch/depends/x86_64-w64-mingw32/lib -Wl,-s -Wl,-subsystem,console -mthreads -o stl.exe stltest.o  
> /usr/bin/x86_64-w64-mingw32-ld: stltest.o: in function `__gthread_mutex_lock':
> /usr/lib/gcc/x86_64-w64-mingw32/13-posix/include/c++/x86_64-w64-mingw32/bits/gthr-default.h:749:(.text+0x809): undefined reference to `pthread_mutex_lock'
> /usr/bin/x86_64-w64-mingw32-ld: stltest.o: in function `__gthread_mutex_unlock':
> /usr/lib/gcc/x86_64-w64-mingw32/13-posix/include/c++/x86_64-w64-mingw32/bits/gthr-default.h:779:(.text+0x81d): undefined reference to `pthread_mutex_unlock'
> /usr/bin/x86_64-w64-mingw32-ld: stltest.o: in function `__gthread_mutex_lock':
> /usr/lib/gcc/x86_64-w64-mingw32/13-posix/include/c++/x86_64-w64-mingw32/bits/gthr-default.h:749:(.text$_ZSt4findIN11__gnu_debug14_Safe_iteratorIN9__gnu_cxx17__normal_iteratorIPiNSt9__cxx19986vectorIiSaIiEEEEENSt7__debug6vectorIiS7_EESt26random_access_iterator_tagEEiET_SF_SF_RKT0_[_ZSt4findIN11__gnu_debug14_Safe_iteratorIN9__gnu_cxx17__normal_iteratorIPiNSt9__cxx19986vectorIiSaIiEEEEENSt7__debug6vectorIiS7_EESt26random_access_iterator_tagEEiET_SF_SF_RKT0_]+0x2ce): undefined reference to `pthread_mutex_lock'
> /usr/bin/x86_64-w64-mingw32-ld: stltest.o: in function `__gthread_mutex_unlock':
> /usr/lib/gcc/x86_64-w64-mingw32/13-posix/include/c++/x86_64-w64-mingw32/bits/gthr-default.h:779:(.text$_ZSt4findIN11__gnu_debug14_Safe_iteratorIN9__gnu_cxx17__normal_iteratorIPiNSt9__cxx19986vectorIiSaIiEEEEENSt7__debug6vectorIiS7_EESt26random_access_iterator_tagEEiET_SF_SF_RKT0_[_ZSt4findIN11__gnu_debug14_Safe_iteratorIN9__gnu_cxx17__normal_iteratorIPiNSt9__cxx19986vectorIiSaIiEEEEENSt7__debug6vectorIiS7_EESt26random_access_iterator_tagEEiET_SF_SF_RKT0_]+0x2e7): undefined reference to `pthread_mutex_unlock'
> /usr/bin/x86_64-w64-mingw32-ld: stltest.o: in function `__gthread_mutex_lock':
> /usr/lib/gcc/x86_64-w64-mingw32/13-posix/include/c++/x86_64-w64-mingw32/bits/gthr-default.h:749:(.text$_ZSt4findIN11__gnu_debug14_Safe_iteratorIN9__gnu_cxx17__normal_iteratorIPiNSt9__cxx19986vectorIiSaIiEEEEENSt7__debug6vectorIiS7_EESt26random_access_iterator_tagEEiET_SF_SF_RKT0_[_ZSt4findIN11__gnu_debug14_Safe_iteratorIN9__gnu_cxx17__normal_iteratorIPiNSt9__cxx19986vectorIiSaIiEEEEENSt7__debug6vectorIiS7_EESt26random_access_iterator_tagEEiET_SF_SF_RKT0_]+0x3c0): undefined reference to `pthread_mutex_lock'
> /usr/bin/x86_64-w64-mingw32-ld: stltest.o: in function `__gthread_mutex_unlock':
> /usr/lib/gcc/x86_64-w64-mingw32/13-posix/include/c++/x86_64-w64-mingw32/bits/gthr-default.h:779:(.text$_ZSt4findIN11__gnu_debug14_Safe_iteratorIN9__gnu_cxx17__normal_iteratorIPiNSt9__cxx19986vectorIiSaIiEEEEENSt7__debug6vectorIiS7_EESt26random_access_iterator_tagEEiET_SF_SF_RKT0_[_ZSt4findIN11__gnu_debug14_Safe_iteratorIN9__gnu_cxx17__normal_iteratorIPiNSt9__cxx19986vectorIiSaIiEEEEENSt7__debug6vectorIiS7_EESt26random_access_iterator_tagEEiET_SF_SF_RKT0_]+0x3d9): undefined reference to `pthread_mutex_unlock'
> /usr/bin/x86_64-w64-mingw32-ld: stltest.o: in function `__gthread_mutex_lock':
> /usr/lib/gcc/x86_64-w64-mingw32/13-posix/include/c++/x86_64-w64-mingw32/bits/gthr-default.h:749:(.text$_ZSt4findIN11__gnu_debug14_Safe_iteratorIN9__gnu_cxx17__normal_iteratorIPiNSt9__cxx19986vectorIiSaIiEEEEENSt7__debug6vectorIiS7_EESt26random_access_iterator_tagEEiET_SF_SF_RKT0_[_ZSt4findIN11__gnu_debug14_Safe_iteratorIN9__gnu_cxx17__normal_iteratorIPiNSt9__cxx19986vectorIiSaIiEEEEENSt7__debug6vectorIiS7_EESt26random_access_iterator_tagEEiET_SF_SF_RKT0_]+0x4b6): undefined reference to `pthread_mutex_lock'
> /usr/bin/x86_64-w64-mingw32-ld: stltest.o: in function `__gthread_mutex_unlock':
> /usr/lib/gcc/x86_64-w64-mingw32/13-posix/include/c++/x86_64-w64-mingw32/bits/gthr-default.h:779:(.text$_ZSt4findIN11__gnu_debug14_Safe_iteratorIN9__gnu_cxx17__normal_iteratorIPiNSt9__cxx19986vectorIiSaIiEEEEENSt7__debug6vectorIiS7_EESt26random_access_iterator_tagEEiET_SF_SF_RKT0_[_ZSt4findIN11__gnu_debug14_Safe_iteratorIN9__gnu_cxx17__normal_iteratorIPiNSt9__cxx19986vectorIiSaIiEEEEENSt7__debug6vectorIiS7_EESt26random_access_iterator_tagEEiET_SF_SF_RKT0_]+0x4cf): undefined reference to `pthread_mutex_unlock'
> /usr/bin/x86_64-w64-mingw32-ld: stltest.o: in function `__gthread_mutex_lock':
> /usr/lib/gcc/x86_64-w64-mingw32/13-posix/include/c++/x86_64-w64-mingw32/bits/gthr-default.h:749:(.text$_ZSt4findIN11__gnu_debug14_Safe_iteratorIN9__gnu_cxx17__normal_iteratorIPiNSt9__cxx19986vectorIiSaIiEEEEENSt7__debug6vectorIiS7_EESt26random_access_iterator_tagEEiET_SF_SF_RKT0_[_ZSt4findIN11__gnu_debug14_Safe_iteratorIN9__gnu_cxx17__normal_iteratorIPiNSt9__cxx19986vectorIiSaIiEEEEENSt7__debug6vectorIiS7_EESt26random_access_iterator_tagEEiET_SF_SF_RKT0_]+0x5ac): undefined reference to `pthread_mutex_lock'
> /usr/bin/x86_64-w64-mingw32-ld: stltest.o: in function `__gthread_mutex_unlock':
> /usr/lib/gcc/x86_64-w64-mingw32/13-posix/include/c++/x86_64-w64-mingw32/bits/gthr-default.h:779:(.text$_ZSt4findIN11__gnu_debug14_Safe_iteratorIN9__gnu_cxx17__normal_iteratorIPiNSt9__cxx19986vectorIiSaIiEEEEENSt7__debug6vectorIiS7_EESt26random_access_iterator_tagEEiET_SF_SF_RKT0_[_ZSt4findIN11__gnu_debug14_Safe_iteratorIN9__gnu_cxx17__normal_iteratorIPiNSt9__cxx19986vectorIiSaIiEEEEENSt7__debug6vectorIiS7_EESt26random_access_iterator_tagEEiET_SF_SF_RKT0_]+0x5c5): undefined reference to `pthread_mutex_unlock'
> /usr/bin/x86_64-w64-mingw32-ld: stltest.o: in function `__gthread_mutex_lock':
> /usr/lib/gcc/x86_64-w64-mingw32/13-posix/include/c++/x86_64-w64-mingw32/bits/gthr-default.h:749:(.text$_ZSt13__copy_move_aILb0EN9__gnu_cxx17__normal_iteratorIPiNSt9__cxx19986vectorIiSaIiEEEEENSt7__debug6vectorIiS5_EESt26random_access_iterator_tagSt20back_insert_iteratorISA_EET3_RKN11__gnu_debug14_Safe_iteratorIT0_T1_T2_EESM_SE_[_ZSt13__copy_move_aILb0EN9__gnu_cxx17__normal_iteratorIPiNSt9__cxx19986vectorIiSaIiEEEEENSt7__debug6vectorIiS5_EESt26random_access_iterator_tagSt20back_insert_iteratorISA_EET3_RKN11__gnu_debug14_Safe_iteratorIT0_T1_T2_EESM_SE_]+0x352): undefined reference to `pthread_mutex_lock'
> /usr/bin/x86_64-w64-mingw32-ld: stltest.o: in function `__gthread_mutex_unlock':
> /usr/lib/gcc/x86_64-w64-mingw32/13-posix/include/c++/x86_64-w64-mingw32/bits/gthr-default.h:779:(.text$_ZSt13__copy_move_aILb0EN9__gnu_cxx17__normal_iteratorIPiNSt9__cxx19986vectorIiSaIiEEEEENSt7__debug6vectorIiS5_EESt26random_access_iterator_tagSt20back_insert_iteratorISA_EET3_RKN11__gnu_debug14_Safe_iteratorIT0_T1_T2_EESM_SE_[_ZSt13__copy_move_aILb0EN9__gnu_cxx17__normal_iteratorIPiNSt9__cxx19986vectorIiSaIiEEEEENSt7__debug6vectorIiS5_EESt26random_access_iterator_tagSt20back_insert_iteratorISA_EET3_RKN11__gnu_debug14_Safe_iteratorIT0_T1_T2_EESM_SE_]+0x36b): undefined reference to `pthread_mutex_unlock'
> /usr/bin/x86_64-w64-mingw32-ld: stltest.o: in function `__gthread_mutex_lock':
> /usr/lib/gcc/x86_64-w64-mingw32/13-posix/include/c++/x86_64-w64-mingw32/bits/gthr-default.h:749:(.text.startup+0x60b): undefined reference to `pthread_mutex_lock'
> /usr/bin/x86_64-w64-mingw32-ld: stltest.o: in function `__gthread_mutex_unlock':
> /usr/lib/gcc/x86_64-w64-mingw32/13-posix/include/c++/x86_64-w64-mingw32/bits/gthr-default.h:779:(.text.startup+0x62a): undefined reference to `pthread_mutex_unlock'
> /usr/bin/x86_64-w64-mingw32-ld: stltest.o: in function `__gthread_mutex_lock':
> /usr/lib/gcc/x86_64-w64-mingw32/13-posix/include/c++/x86_64-w64-mingw32/bits/gthr-default.h:749:(.text.startup+0x84b): undefined reference to `pthread_mutex_lock'
> /usr/bin/x86_64-w64-mingw32-ld: stltest.o: in function `__gthread_mutex_unlock':
> /usr/lib/gcc/x86_64-w64-mingw32/13-posix/include/c++/x86_64-w64-mingw32/bits/gthr-default.h:779:(.text.startup+0x879): undefined reference to `pthread_mutex_unlock'
> collect2: error: ld returned 1 exit status
> gmake[1]: *** [Makefile:69: stl.exe] Error 1
> gmake[1]: Leaving directory '/root/ci_scratch/depends/work/build/x86_64-w64-mingw32/qt/5.15.11-8c515c34c2a/config.tests/stl'
test config.qtbase.tests.stl FAILED
<snip>
Note: Using static linking will disable the use of dynamically
loaded plugins. Make sure to import all needed static plugins,
or compile needed modules into the library.

ERROR: Qt requires a compliant STL library.
make: *** [funcs.mk:298: /root/ci_scratch/depends/x86_64-w64-mingw32/.qt_stamp_configured] Error 3
make: Leaving directory '/root/ci_scratch/depends'
```
depends: Cross-compiling `qt` for `arm-linux-gnueabihf` fails
On Ubuntu 24.04 with glibc 2.39:
```
compiling ../3rdparty/zlib/src/gzclose.c
In file included from /usr/arm-linux-gnueabihf/include/features.h:394,
                 from /usr/arm-linux-gnueabihf/include/bits/libc-header-start.h:33,
                 from /usr/arm-linux-gnueabihf/include/stdio.h:28,
                 from ../3rdparty/zlib/src/gzguts.h:40,
                 from ../3rdparty/zlib/src/gzclose.c:6:
/usr/arm-linux-gnueabihf/include/features-time64.h:26:5: error: #error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
   26 | #   error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
      |     ^~~~~
```

Some similar issues in https://bugreports.qt.io suggest to switch from the builtin `zlib` to a system one. But that doesn't look like an option for us.


Discussion / hints:
I think this problem may be because of https://github.com/bitcoin/bitcoin/blob/61de64df6790077857faba84796bb874b59c5d15/src/index/base.cpp#L163-L168
Setup m_synced = true; before Commit(); So this may cause a race condition window to
https://github.com/bitcoin/bitcoin/blob/61de64df6790077857faba84796bb874b59c5d15/src/index/base.cpp#L271-L274

I submit a pr for fix:https://github.com/bitcoin/bitcoin/pull/29776#issue-2217435468
> If you try and cross-compile for Windows using master ([d04324a](https://github.com/bitcoin/bitcoin/commit/d04324a7056a735c1127ba8ccdc720a16e7281a3)) `DEBUG=1`, it fails. This is on a Ubuntu Noble machine, with `x86_64-w64-mingw32-g++ (GCC) 13-win32`.

This error also might be triggered on Ubuntu 22,04 by installing the `g++-mingw-w64-x86-64` package.


Fix patch:
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index d8fa7f9a689e8..b306a1e96ac32 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -62,7 +62,7 @@ jobs:
           echo "TEST_BASE=$(git rev-list -n$((${{ env.MAX_COUNT }} + 1)) --reverse HEAD ^$(git rev-list -n1 --merges HEAD)^@ | head -1)" >> "$GITHUB_ENV"
       - run: |
           sudo apt-get update
-          sudo apt-get install clang ccache build-essential libtool autotools-dev automake pkg-config bsdmainutils python3-zmq libevent-dev libboost-dev libsqlite3-dev libdb++-dev systemtap-sdt-dev libminiupnpc-dev libnatpmp-dev libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools qtwayland5 libqrencode-dev -y
+          sudo apt-get install clang ccache build-essential libtool autotools-dev automake pkg-config bsdmainutils python3-zmq libevent-dev libboost-dev libsqlite3-dev libdb++-dev systemtap-sdt-dev libminiupnpc-dev libnatpmp-dev qtbase5-dev qttools5-dev qttools5-dev-tools qtwayland5 libqrencode-dev -y
       - name: Compile and run tests
         run: |
           # Run tests on commits after the last merge commit and before the PR head commit
diff --git a/contrib/windeploy/win-codesign.cert b/contrib/windeploy/win-codesign.cert
index 22f17296b6aaa..ec60a3018d91f 100644
--- a/contrib/windeploy/win-codesign.cert
+++ b/contrib/windeploy/win-codesign.cert
@@ -1,8 +1,8 @@
 -----BEGIN CERTIFICATE-----
-MIIHfDCCBWSgAwIBAgIQCmVvdQal72U2QxbUTT3SRTANBgkqhkiG9w0BAQsFADBp
+MIIHeTCCBWGgAwIBAgIQBzR46J2yq3g++NbQS/BBVDANBgkqhkiG9w0BAQsFADBp
 MQswCQYDVQQGEwJVUzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xQTA/BgNVBAMT
 OERpZ2lDZXJ0IFRydXN0ZWQgRzQgQ29kZSBTaWduaW5nIFJTQTQwOTYgU0hBMzg0
-IDIwMjEgQ0ExMB4XDTIyMDUyNDAwMDAwMFoXDTI0MDUyOTIzNTk1OVowgYAxCzAJ
+IDIwMjEgQ0ExMB4XDTI0MDUyMjAwMDAwMFoXDTI3MDUzMTIzNTk1OVowgYAxCzAJ
 BgNVBAYTAlVTMREwDwYDVQQIEwhEZWxhd2FyZTEOMAwGA1UEBxMFTGV3ZXMxJjAk
 BgNVBAoTHUJpdGNvaW4gQ29yZSBDb2RlIFNpZ25pbmcgTExDMSYwJAYDVQQDEx1C
 aXRjb2luIENvcmUgQ29kZSBTaWduaW5nIExMQzCCAiIwDQYJKoZIhvcNAQEBBQAD
@@ -17,28 +17,28 @@ CDvScIgnQXmk+cbKMBtg9kM0F+aLWsN2xVf0uAj3U7sdXLrfJeW0DZIktWtTBQzX
 O/OE4Ka+1WFnDg0HJIih0cTjl9YYvfe53L4pCGy+qGt/XGBRqCMfXp3g+H9FGR5r
 pensVVcsrv3GbTfYdlpdmp9OHH5G57GTAZueobCZg7r7RKK0zPU9EiTLJxzyXuai
 v/Ksd8eIhHRjewMaQuAtQM1tO+oKAbLF0v2M7v7/aVT76X32JllYAizm3zjvAgMB
-AAGjggIGMIICAjAfBgNVHSMEGDAWgBRoN+Drtjv4XxGG+/5hewiIZfROQjAdBgNV
-HQ4EFgQUvCpU58PIuofv0kHJ3Ty0YDKEy3cwDgYDVR0PAQH/BAQDAgeAMBMGA1Ud
-JQQMMAoGCCsGAQUFBwMDMIG1BgNVHR8Ega0wgaowU6BRoE+GTWh0dHA6Ly9jcmwz
-LmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydFRydXN0ZWRHNENvZGVTaWduaW5nUlNBNDA5
-NlNIQTM4NDIwMjFDQTEuY3JsMFOgUaBPhk1odHRwOi8vY3JsNC5kaWdpY2VydC5j
-b20vRGlnaUNlcnRUcnVzdGVkRzRDb2RlU2lnbmluZ1JTQTQwOTZTSEEzODQyMDIx
-Q0ExLmNybDA+BgNVHSAENzA1MDMGBmeBDAEEATApMCcGCCsGAQUFBwIBFhtodHRw
-Oi8vd3d3LmRpZ2ljZXJ0LmNvbS9DUFMwgZQGCCsGAQUFBwEBBIGHMIGEMCQGCCsG
+AAGjggIDMIIB/zAfBgNVHSMEGDAWgBRoN+Drtjv4XxGG+/5hewiIZfROQjAdBgNV
+HQ4EFgQUvCpU58PIuofv0kHJ3Ty0YDKEy3cwPgYDVR0gBDcwNTAzBgZngQwBBAEw
+KTAnBggrBgEFBQcCARYbaHR0cDovL3d3dy5kaWdpY2VydC5jb20vQ1BTMA4GA1Ud
+DwEB/wQEAwIHgDATBgNVHSUEDDAKBggrBgEFBQcDAzCBtQYDVR0fBIGtMIGqMFOg
+UaBPhk1odHRwOi8vY3JsMy5kaWdpY2VydC5jb20vRGlnaUNlcnRUcnVzdGVkRzRD
+b2RlU2lnbmluZ1JTQTQwOTZTSEEzODQyMDIxQ0ExLmNybDBToFGgT4ZNaHR0cDov
+L2NybDQuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0VHJ1c3RlZEc0Q29kZVNpZ25pbmdS
+U0E0MDk2U0hBMzg0MjAyMUNBMS5jcmwwgZQGCCsGAQUFBwEBBIGHMIGEMCQGCCsG
 AQUFBzABhhhodHRwOi8vb2NzcC5kaWdpY2VydC5jb20wXAYIKwYBBQUHMAKGUGh0
 dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydFRydXN0ZWRHNENvZGVT
-aWduaW5nUlNBNDA5NlNIQTM4NDIwMjFDQTEuY3J0MAwGA1UdEwEB/wQCMAAwDQYJ
-KoZIhvcNAQELBQADggIBABhpTZufRws1vrtI0xB1/UWrSEJxdPHivfpXE708dzum
-Jh3TFzpsEUCQX5BJJet1l7x92sKNeAL7votA+8O8YvMD64Kim7VKA2BB8AOHKQbp
-r1c2iZBwwofInviRYvsrvQta6KBy2KOe1L/l0KnpUazL9Tv4VKvuWAw/Qc0/eTQr
-NZRsmADORxnZ1qW+SpF+/WbazIYjod/Oqb1U3on+PzyiGD3SjzNhsdFRptqzrIaY
-UVV+2XHG4fN6A8wkyQL5NIVXGiK7rqS5VrRAv58Lf1ZZTghdAL+5SySE0OsR9t0K
-W73ZB9pxbuZZ6Zfxjotjw+IilCEm3ADbc7Eb2ijI4x8mix0XWMUrhL34s7/jRyDi
-P+30aSgjWp611tp/EYRW5kpIaFR8AesDdM0DSSCCRXOMwQG2Tq2+CnqItB5oLNPp
-2XySwlIWvmjbzsREfIpE3yh3bxmHY+vFIc2R0nNkbWNIT6AGtaEQ7oWkgpK8YMkA
-QCf4EUC4Qa7qHiH6YSmYJhjApBLC7UDwevgwxuDrwimWAj+tDkzdnENMcBp4SAy6
-LwUuDi2IU6HRSXWdh2YEkDbc3FdwknnnEWaB4dlRL85YjHyLXN0KiE7SKTj1LfR4
-dGeDqVUlDj9D5+X4a7F89wLP/um40/52HUQv5t5WcNr/47r9aVkx9DHs1b8oUnLg
+aWduaW5nUlNBNDA5NlNIQTM4NDIwMjFDQTEuY3J0MAkGA1UdEwQCMAAwDQYJKoZI
+hvcNAQELBQADggIBADdniG9IY9oOfw1e3+uc2lR4hoZqquJQRrCnbWJ1npnCTavI
+CfcEEMuQ5ztg4TR7tQNj2KcaHWKuPYxEz2bg8HpSPG27lnXaz4pLgfqvjdZWNH2v
+W6DGRUAwuMQHSV0qhuRcJPZuhwSFx/8y4r++jIcBxCbt/Jprt/bqc8vZZZzTDPfG
+M6cGaKMDvF//OkUPVzh4s557kV7+LoaX8CigiACZky3Zj3tkQfJYkEvdQseNvX49
+CMJ+cjN+fGweshbn/DszAT5oXW5l2PXeceyGrE+5Ex1ELXCPqNj8ZSn+S9IKZOag
+zDFBA93RTVD438peXPz//xgusgnmSqSPS5tCp9KSvew81acu4v/+egg9EgSSx5Ho
+9fkOX7JuygvN3r3UZqsddxdwf2dPvBDYlMdieF8qsR7H5DQPQoaTVrIhW4TFtJl/
+UPjVlnDwu+yvMC70F+CaVgQs01uZ0VKuG3KNkkEj6+V/SM54NVVgcY/Q7llKIFA8
+Qk8Ip8/83cVBptKW+OU+i2ZwoYskLbdfDE31X2knUIouNZgBBMhzc5WjJCEGXAPm
+9xYZMn87cc+ejxCw6/WC4b6tDCziO8drq76Pl6LTNPOtRkEVqt12p8Uqi9PgznUB
+bdHeoF5XHt1Ca2ySpSYuMz5djwIC2ws8kiMm44/AyTm6dwRcesiOTqnaRc+t
 -----END CERTIFICATE-----
 -----BEGIN CERTIFICATE-----
 MIIGsDCCBJigAwIBAgIQCK1AsmDSnEyfXs2pvZOu2TANBgkqhkiG9w0BAQwFADBi
diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk
index 047d1d5aee178..12820dd65bf83 100644
--- a/depends/packages/qt.mk
+++ b/depends/packages/qt.mk
@@ -23,6 +23,7 @@ $(package)_patches += guix_cross_lib_path.patch
 $(package)_patches += fix-macos-linker.patch
 $(package)_patches += memory_resource.patch
 $(package)_patches += windows_lto.patch
+$(package)_patches += zlib-timebits64.patch
 
 $(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
 $(package)_qttranslations_sha256_hash=38b942bc7e62794dd072945c8a92bb9dfffed24070aea300327a3bb42f855609
@@ -180,6 +181,7 @@ $(package)_config_opts_mingw32 += -xplatform win32-g++
 $(package)_config_opts_mingw32 += "QMAKE_CFLAGS = '$($(package)_cflags) $($(package)_cppflags)'"
 $(package)_config_opts_mingw32 += "QMAKE_CXX = '$($(package)_cxx)'"
 $(package)_config_opts_mingw32 += "QMAKE_CXXFLAGS = '$($(package)_cxxflags) $($(package)_cppflags)'"
+$(package)_config_opts_mingw32 += "QMAKE_LINK = '$($(package)_cxx)'"
 $(package)_config_opts_mingw32 += "QMAKE_LFLAGS = '$($(package)_ldflags)'"
 $(package)_config_opts_mingw32 += "QMAKE_LIB = '$($(package)_ar) rc'"
 $(package)_config_opts_mingw32 += -device-option CROSS_COMPILE="$(host)-"
@@ -255,6 +257,7 @@ define $(package)_preprocess_cmds
   patch -p1 -i $($(package)_patch_dir)/fast_fixed_dtoa_no_optimize.patch && \
   patch -p1 -i $($(package)_patch_dir)/guix_cross_lib_path.patch && \
   patch -p1 -i $($(package)_patch_dir)/windows_lto.patch && \
+  patch -p1 -i $($(package)_patch_dir)/zlib-timebits64.patch && \
   mkdir -p qtbase/mkspecs/macx-clang-linux &&\
   cp -f qtbase/mkspecs/macx-clang/qplatformdefs.h qtbase/mkspecs/macx-clang-linux/ &&\
   cp -f $($(package)_patch_dir)/mac-qmake.conf qtbase/mkspecs/macx-clang-linux/qmake.conf && \
diff --git a/depends/patches/qt/zlib-timebits64.patch b/depends/patches/qt/zlib-timebits64.patch
new file mode 100644
index 0000000000000..139c1dfa77f3e
--- /dev/null
+++ b/depends/patches/qt/zlib-timebits64.patch
@@ -0,0 +1,31 @@
+From a566e156b3fa07b566ddbf6801b517a9dba04fa3 Mon Sep 17 00:00:00 2001
+From: Mark Adler <madler@alumni.caltech.edu>
+Date: Sat, 29 Jul 2023 22:13:09 -0700
+Subject: [PATCH] Avoid compiler complaints if _TIME_BITS defined when building
+ zlib.
+
+zlib does not use time_t, so _TIME_BITS is irrelevant. However it
+may be defined anyway as part of a sledgehammer indiscriminately
+applied to all builds.
+
+From https://github.com/madler/zlib/commit/a566e156b3fa07b566ddbf6801b517a9dba04fa3.patch
+---
+ qtbase/src/3rdparty/zlib/src/gzguts.h | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/qtbase/src/3rdparty/zlib/src/gzguts.h b/qtbase/src/3rdparty/zlib/src/gzguts.h
+index e23f831f5..f9375047e 100644
+--- a/qtbase/src/3rdparty/zlib/src/gzguts.h
++++ b/qtbase/src/3rdparty/zlib/src/gzguts.h
+@@ -26,9 +26,8 @@
+ #  ifndef _LARGEFILE_SOURCE
+ #    define _LARGEFILE_SOURCE 1
+ #  endif
+-#  ifdef _FILE_OFFSET_BITS
+-#    undef _FILE_OFFSET_BITS
+-#  endif
++#  undef _FILE_OFFSET_BITS
++#  undef _TIME_BITS
+ #endif
+ 
+ #ifdef HAVE_HIDDEN
diff --git a/doc/build-unix.md b/doc/build-unix.md
index bf367fc4216b1..94404a6d0ddcc 100644
--- a/doc/build-unix.md
+++ b/doc/build-unix.md
@@ -81,7 +81,7 @@ To build without GUI pass `--without-gui`.
 
 To build with Qt 5 you need the following:
 
-    sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools
+    sudo apt-get install qtbase5-dev qttools5-dev qttools5-dev-tools
 
 Additionally, to support Wayland protocol for modern desktop environments:
 
diff --git a/doc/release-notes.md b/doc/release-notes.md
index cb64d1bbe83ea..127d14f4ce2c6 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -1,11 +1,11 @@
-26.1 Release Notes
+26.2rc1 Release Notes
 ==================
 
-Bitcoin Core version 26.1 is now available from:
+Bitcoin Core version 26.2rc1 is now available from:
 
-  <https://bitcoincore.org/bin/bitcoin-core-26.1/>
+  <https://bitcoincore.org/bin/bitcoin-core-26.2/test.rc1/>
 
-This release includes various bug fixes and performance
+This release includes new features, various bug fixes and performance
 improvements, as well as updated translations.
 
 Please report bugs using the issue tracker at GitHub:
@@ -40,66 +40,51 @@ unsupported systems.
 Notable changes
 ===============
 
-### Wallet
+### Script
 
-- #28994 wallet: skip BnB when SFFO is enabled
-- #28920 wallet: birth time update during tx scanning
-- #29176 wallet: Fix use-after-free in WalletBatch::EraseRecords
-- #29510 wallet: getrawchangeaddress and getnewaddress failures should not affect keypools for descriptor wallets
-
-### RPC
-
-- #29003 rpc: fix getrawtransaction segfault
-- #28784 rpc: keep .cookie file if it was not generated
-
-### Logs
-
-- #29227 log mempool loading progress
+- #29853: sign: don't assume we are parsing a sane TapMiniscript
 
 ### P2P and network changes
 
-- #29200 net: create I2P sessions using both ECIES-X25519 and ElGamal encryption
-- #29412 p2p: Don't process mutated blocks
-- #29524 p2p: Don't consider blocks mutated if they don't connect to known prev block
+- #29691: Change Luke Dashjr seed to dashjr-list-of-p2p-nodes.us
+- #30085: p2p: detect addnode cjdns peers in GetAddedNodeInfo()
 
-### Build
+### RPC
 
-- #29127 Use hardened runtime on macOS release builds.
-- #29195 build: Fix -Xclang -internal-isystem option
+- #29869: rpc, bugfix: Enforce maximum value for setmocktime
+- #28554: bugfix: throw an error if an invalid parameter is passed to getnetworkhashps RPC
+- #30094: rpc: move UniValue in blockToJSON
+- #29870: rpc: Reword SighashFromStr error message
 
-### CI
+### Build
 
-- #28992 ci: Use Ubuntu 24.04 Noble for asan,tsan,tidy,fuzz
-- #29080 ci: Set HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK to avoid unrelated failures
-- #29610 ci: Fix "macOS native" job
+- #29747: depends: fix mingw-w64 Qt DEBUG=1 build
+- #29985: depends: Fix build of Qt for 32-bit platforms with recent glibc
 
-### Miscellaneous
+### Misc
 
-- #28391 refactor: Simplify CTxMempool/BlockAssembler fields, remove some external mapTx access
-- #29179 test: wallet rescan with reorged parent + IsFromMe child in mempool
-- #28791 snapshots: don't core dump when running -checkblockindex after loadtxoutset
-- #29357 test: Drop x modifier in fsbridge::fopen call for MinGW builds
-- #29529 fuzz: restrict fopencookie usage to Linux & FreeBSD
+- #29776: ThreadSanitizer: Fix #29767
+- #29856: ci: Bump s390x to ubuntu:24.04
+- #29764: doc: Suggest installing dev packages for debian/ubuntu qt5 build
+- #30149: contrib: Renew Windows code signing certificate
 
 Credits
 =======
 
 Thanks to everyone who directly contributed to this release:
 
+- Antoine Poinsot
+- Ava Chow
 - dergoegge
 - fanquake
-- furszy
 - glozow
-- Greg Sanders
-- Hennadii Stepanov
-- Jon Atack
+- Jameson Lopp
+- jonatack
+- laanwj
+- Luke Dashjr
 - MarcoFalke
-- Mark Friedenbach
-- Martin Zumsande
-- Murch
-- Roman Zeyde
-- stickies-v
-- UdjinM6
+- nanlour
+- willcl-ark
 
 As well as to everyone that helped with translations on
 [Transifex](https://www.transifex.com/bitcoin/bitcoin/).
diff --git a/doc/release-notes/release-notes-26.1.md b/doc/release-notes/release-notes-26.1.md
new file mode 100644
index 0000000000000..cb64d1bbe83ea
--- /dev/null
+++ b/doc/release-notes/release-notes-26.1.md
@@ -0,0 +1,105 @@
+26.1 Release Notes
+==================
+
+Bitcoin Core version 26.1 is now available from:
+
+  <https://bitcoincore.org/bin/bitcoin-core-26.1/>
+
+This release includes various bug fixes and performance
+improvements, as well as updated translations.
+
+Please report bugs using the issue tracker at GitHub:
+
+  <https://github.com/bitcoin/bitcoin/issues>
+
+To receive security and update notifications, please subscribe to:
+
+  <https://bitcoincore.org/en/list/announcements/join/>
+
+How to Upgrade
+==============
+
+If you are running an older version, shut it down. Wait until it has completely
+shut down (which might take a few minutes in some cases), then run the
+installer (on Windows) or just copy over `/Applications/Bitcoin-Qt` (on macOS)
+or `bitcoind`/`bitcoin-qt` (on Linux).
+
+Upgrading directly from a version of Bitcoin Core that has reached its EOL is
+possible, but it might take some time if the data directory needs to be migrated. Old
+wallet versions of Bitcoin Core are generally supported.
+
+Compatibility
+==============
+
+Bitcoin Core is supported and extensively tested on operating systems
+using the Linux kernel, macOS 11.0+, and Windows 7 and newer.  Bitcoin
+Core should also work on most other Unix-like systems but is not as
+frequently tested on them.  It is not recommended to use Bitcoin Core on
+unsupported systems.
+
+Notable changes
+===============
+
+### Wallet
+
+- #28994 wallet: skip BnB when SFFO is enabled
+- #28920 wallet: birth time update during tx scanning
+- #29176 wallet: Fix use-after-free in WalletBatch::EraseRecords
+- #29510 wallet: getrawchangeaddress and getnewaddress failures should not affect keypools for descriptor wallets
+
+### RPC
+
+- #29003 rpc: fix getrawtransaction segfault
+- #28784 rpc: keep .cookie file if it was not generated
+
+### Logs
+
+- #29227 log mempool loading progress
+
+### P2P and network changes
+
+- #29200 net: create I2P sessions using both ECIES-X25519 and ElGamal encryption
+- #29412 p2p: Don't process mutated blocks
+- #29524 p2p: Don't consider blocks mutated if they don't connect to known prev block
+
+### Build
+
+- #29127 Use hardened runtime on macOS release builds.
+- #29195 build: Fix -Xclang -internal-isystem option
+
+### CI
+
+- #28992 ci: Use Ubuntu 24.04 Noble for asan,tsan,tidy,fuzz
+- #29080 ci: Set HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK to avoid unrelated failures
+- #29610 ci: Fix "macOS native" job
+
+### Miscellaneous
+
+- #28391 refactor: Simplify CTxMempool/BlockAssembler fields, remove some external mapTx access
+- #29179 test: wallet rescan with reorged parent + IsFromMe child in mempool
+- #28791 snapshots: don't core dump when running -checkblockindex after loadtxoutset
+- #29357 test: Drop x modifier in fsbridge::fopen call for MinGW builds
+- #29529 fuzz: restrict fopencookie usage to Linux & FreeBSD
+
+Credits
+=======
+
+Thanks to everyone who directly contributed to this release:
+
+- dergoegge
+- fanquake
+- furszy
+- glozow
+- Greg Sanders
+- Hennadii Stepanov
+- Jon Atack
+- MarcoFalke
+- Mark Friedenbach
+- Martin Zumsande
+- Murch
+- Roman Zeyde
+- stickies-v
+- UdjinM6
+
+As well as to everyone that helped with translations on
+[Transifex](https://www.transifex.com/bitcoin/bitcoin/).
diff --git a/src/core_read.cpp b/src/core_read.cpp
index dfabf3a0c2f3d..ffc4bb496566b 100644
--- a/src/core_read.cpp
+++ b/src/core_read.cpp
@@ -257,6 +257,6 @@ util::Result<int> SighashFromStr(const std::string& sighash)
     if (it != map_sighash_values.end()) {
         return it->second;
     } else {
-        return util::Error{Untranslated(sighash + " is not a valid sighash parameter.")};
+        return util::Error{Untranslated("'" + sighash + "' is not a valid sighash parameter.")};
     }
 }
diff --git a/src/index/base.cpp b/src/index/base.cpp
index 8474d01c41f8f..298755038c08c 100644
--- a/src/index/base.cpp
+++ b/src/index/base.cpp
@@ -165,9 +165,9 @@ void BaseIndex::ThreadSync()
                 const CBlockIndex* pindex_next = NextSyncBlock(pindex, m_chainstate->m_chain);
                 if (!pindex_next) {
                     SetBestBlockIndex(pindex);
-                    m_synced = true;
                     // No need to handle errors in Commit. See rationale above.
                     Commit();
+                    m_synced = true;
                     break;
                 }
                 if (pindex_next->pprev != pindex && !Rewind(pindex, pindex_next->pprev)) {
diff --git a/src/kernel/chainparams.cpp b/src/kernel/chainparams.cpp
index 73ba330ff039e..96656de572846 100644
--- a/src/kernel/chainparams.cpp
+++ b/src/kernel/chainparams.cpp
@@ -133,7 +133,7 @@ class CMainParams : public CChainParams {
         // release ASAP to avoid it where possible.
         vSeeds.emplace_back("seed.bitcoin.sipa.be."); // Pieter Wuille, only supports x1, x5, x9, and xd
         vSeeds.emplace_back("dnsseed.bluematt.me."); // Matt Corallo, only supports x9
-        vSeeds.emplace_back("dnsseed.bitcoin.dashjr.org."); // Luke Dashjr
+        vSeeds.emplace_back("dnsseed.bitcoin.dashjr-list-of-p2p-nodes.us."); // Luke Dashjr
         vSeeds.emplace_back("seed.bitcoinstats.com."); // Christian Decker, supports x1 - xf
         vSeeds.emplace_back("seed.bitcoin.jonasschnelli.ch."); // Jonas Schnelli, only supports x1, x5, x9, and xd
         vSeeds.emplace_back("seed.btc.petertodd.org."); // Peter Todd, only supports x1, x5, x9, and xd
diff --git a/src/net.cpp b/src/net.cpp
index 5305e1148ad4f..36a8964bb6d17 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -2794,7 +2794,7 @@ std::vector<AddedNodeInfo> CConnman::GetAddedNodeInfo() const
     }
 
     for (const auto& addr : lAddresses) {
-        CService service(LookupNumeric(addr.m_added_node, GetDefaultPort(addr.m_added_node)));
+        CService service{MaybeFlipIPv6toCJDNS(LookupNumeric(addr.m_added_node, GetDefaultPort(addr.m_added_node)))};
         AddedNodeInfo addedNode{addr, CService(), false, false};
         if (service.IsValid()) {
             // strAddNode is an IP:port
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp
index 7b84747a3fd8b..1ed1ed50c2d36 100644
--- a/src/rpc/blockchain.cpp
+++ b/src/rpc/blockchain.cpp
@@ -190,12 +190,12 @@ UniValue blockToJSON(BlockManager& blockman, const CBlock& block, const CBlockIn
                 const CTxUndo* txundo = (have_undo && i > 0) ? &blockUndo.vtxundo.at(i - 1) : nullptr;
                 UniValue objTx(UniValue::VOBJ);
                 TxToUniv(*tx, /*block_hash=*/uint256(), /*entry=*/objTx, /*include_hex=*/true, RPCSerializationFlags(), txundo, verbosity);
-                txs.push_back(objTx);
+                txs.push_back(std::move(objTx));
             }
             break;
     }
 
-    result.pushKV("tx", txs);
+    result.pushKV("tx", std::move(txs));
 
     return result;
 }
diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp
index 76170c32018dd..a1894a303052c 100644
--- a/src/rpc/mining.cpp
+++ b/src/rpc/mining.cpp
@@ -49,13 +49,22 @@ using node::UpdateTime;
 
 /**
  * Return average network hashes per second based on the last 'lookup' blocks,
- * or from the last difficulty change if 'lookup' is nonpositive.
- * If 'height' is nonnegative, compute the estimate at the time when a given block was found.
+ * or from the last difficulty change if 'lookup' is -1.
+ * If 'height' is -1, compute the estimate from current chain tip.
+ * If 'height' is a valid block height, compute the estimate at the time when a given block was found.
  */
 static UniValue GetNetworkHashPS(int lookup, int height, const CChain& active_chain) {
+    if (lookup < -1 || lookup == 0) {
+        throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid nblocks. Must be a positive number or -1.");
+    }
+
+    if (height < -1 || height > active_chain.Height()) {
+        throw JSONRPCError(RPC_INVALID_PARAMETER, "Block does not exist at specified height");
+    }
+
     const CBlockIndex* pb = active_chain.Tip();
 
-    if (height >= 0 && height < active_chain.Height()) {
+    if (height >= 0) {
         pb = active_chain[height];
     }
 
@@ -63,7 +72,7 @@ static UniValue GetNetworkHashPS(int lookup, int height, const CChain& active_ch
         return 0;
 
     // If lookup is -1, then use blocks since last difficulty change.
-    if (lookup <= 0)
+    if (lookup == -1)
         lookup = pb->nHeight % Params().GetConsensus().DifficultyAdjustmentInterval() + 1;
 
     // If lookup is larger than chain, then set it to chain length.
@@ -97,7 +106,7 @@ static RPCHelpMan getnetworkhashps()
                 "Pass in [blocks] to override # of blocks, -1 specifies since last difficulty change.\n"
                 "Pass in [height] to estimate the network speed at the time when a certain block was found.\n",
                 {
-                    {"nblocks", RPCArg::Type::NUM, RPCArg::Default{120}, "The number of blocks, or -1 for blocks since last difficulty change."},
+                    {"nblocks", RPCArg::Type::NUM, RPCArg::Default{120}, "The number of previous blocks to calculate estimate from, or -1 for blocks since last difficulty change."},
                     {"height", RPCArg::Type::NUM, RPCArg::Default{-1}, "To estimate at the time of the given height."},
                 },
                 RPCResult{
diff --git a/src/rpc/node.cpp b/src/rpc/node.cpp
index 6b3662996c43f..020e87f19c521 100644
--- a/src/rpc/node.cpp
+++ b/src/rpc/node.cpp
@@ -22,6 +22,7 @@
 #include <univalue.h>
 #include <util/any.h>
 #include <util/check.h>
+#include <util/time.h>
 
 #include <stdint.h>
 #ifdef HAVE_MALLOC_INFO
@@ -54,9 +55,11 @@ static RPCHelpMan setmocktime()
     LOCK(cs_main);
 
     const int64_t time{request.params[0].getInt<int64_t>()};
-    if (time < 0) {
-        throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Mocktime cannot be negative: %s.", time));
+    constexpr int64_t max_time{Ticks<std::chrono::seconds>(std::chrono::nanoseconds::max())};
+    if (time < 0 || time > max_time) {
+        throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Mocktime must be in the range [0, %s], not %s.", max_time, time));
     }
+
     SetMockTime(time);
     const NodeContext& node_context{EnsureAnyNodeContext(request.context)};
     for (const auto& chain_client : node_context.chain_clients) {
diff --git a/src/script/sign.cpp b/src/script/sign.cpp
index 251a8420f7464..d91a246d03cda 100644
--- a/src/script/sign.cpp
+++ b/src/script/sign.cpp
@@ -295,7 +295,7 @@ struct TapSatisfier: Satisfier<XOnlyPubKey> {
     //! Conversion from a raw xonly public key.
     template <typename I>
     std::optional<XOnlyPubKey> FromPKBytes(I first, I last) const {
-        CHECK_NONFATAL(last - first == 32);
+        if (last - first != 32) return {};
         XOnlyPubKey pubkey;
         std::copy(first, last, pubkey.begin());
         return pubkey;


Test patch:
diff --git a/ci/test/00_setup_env_native_tidy.sh b/ci/test/00_setup_env_native_tidy.sh
index c03392af063c4..6ae513031c385 100755
--- a/ci/test/00_setup_env_native_tidy.sh
+++ b/ci/test/00_setup_env_native_tidy.sh
@@ -9,7 +9,7 @@ export LC_ALL=C.UTF-8
 export CI_IMAGE_NAME_TAG="docker.io/ubuntu:24.04"
 export CONTAINER_NAME=ci_native_tidy
 export TIDY_LLVM_V="17"
-export PACKAGES="clang-${TIDY_LLVM_V} libclang-${TIDY_LLVM_V}-dev llvm-${TIDY_LLVM_V}-dev libomp-${TIDY_LLVM_V}-dev clang-tidy-${TIDY_LLVM_V} jq bear cmake libevent-dev libboost-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev systemtap-sdt-dev libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libqrencode-dev libsqlite3-dev libdb++-dev"
+export PACKAGES="clang-${TIDY_LLVM_V} libclang-${TIDY_LLVM_V}-dev llvm-${TIDY_LLVM_V}-dev libomp-${TIDY_LLVM_V}-dev clang-tidy-${TIDY_LLVM_V} jq bear cmake libevent-dev libboost-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev systemtap-sdt-dev qtbase5-dev qttools5-dev qttools5-dev-tools libqrencode-dev libsqlite3-dev libdb++-dev"
 export NO_DEPENDS=1
 export RUN_UNIT_TESTS=false
 export RUN_FUNCTIONAL_TESTS=false
diff --git a/ci/test/00_setup_env_s390x.sh b/ci/test/00_setup_env_s390x.sh
index ca84ecce5153c..2fd94e253cac7 100755
--- a/ci/test/00_setup_env_s390x.sh
+++ b/ci/test/00_setup_env_s390x.sh
@@ -9,8 +9,8 @@ export LC_ALL=C.UTF-8
 export HOST=s390x-linux-gnu
 export PACKAGES="python3-zmq"
 export CONTAINER_NAME=ci_s390x
-export CI_IMAGE_NAME_TAG="docker.io/s390x/debian:bookworm"
-export TEST_RUNNER_EXTRA="--exclude feature_init,rpc_bind,feature_bind_extra"  # Excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547
+export CI_IMAGE_NAME_TAG="docker.io/s390x/ubuntu:24.04"
+export TEST_RUNNER_EXTRA="--exclude rpc_bind,feature_bind_extra"  # Excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547
 export RUN_FUNCTIONAL_TESTS=true
 export GOAL="install"
 export BITCOIN_CONFIG="--enable-reduce-exports"
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index 624d0b2c129f6..50715e9a04011 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -1276,6 +1276,30 @@ BOOST_AUTO_TEST_CASE(script_combineSigs)
     BOOST_CHECK(combined.scriptSig == partial3c);
 }
 
+/**
+ * Reproduction of an exception incorrectly raised when parsing a public key inside a TapMiniscript.
+ */
+BOOST_AUTO_TEST_CASE(sign_invalid_miniscript)
+{
+    FillableSigningProvider keystore;
+    SignatureData sig_data;
+    CMutableTransaction prev, curr;
+
+    // Create a Taproot output which contains a leaf in which a non-32 bytes push is used where a public key is expected
+    // by the Miniscript parser. This offending Script was found by the RPC fuzzer.
+    const auto invalid_pubkey{ParseHex("173d36c8c9c9c9ffffffffffff0200000000021e1e37373721361818181818181e1e1e1e19000000000000000000b19292929292926b006c9b9b9292")};
+    TaprootBuilder builder;
+    builder.Add(0, {invalid_pubkey}, 0xc0);
+    XOnlyPubKey nums{ParseHex("50929b74c1a04954b78b4b6035e97a5e078a5a0f28ec96d547bfee9ace803ac0")};
+    builder.Finalize(nums);
+    prev.vout.emplace_back(0, GetScriptForDestination(builder.GetOutput()));
+    curr.vin.emplace_back(COutPoint{prev.GetHash(), 0});
+    sig_data.tr_spenddata = builder.GetSpendData();
+
+    // SignSignature can fail but it shouldn't raise an exception (nor crash).
+    BOOST_CHECK(!SignSignature(keystore, CTransaction(prev), curr, 0, SIGHASH_ALL, sig_data));
+}
+
 BOOST_AUTO_TEST_CASE(script_standard_push)
 {
     ScriptError err;
diff --git a/test/functional/rpc_blockchain.py b/test/functional/rpc_blockchain.py
index 53163720bb3f4..b485227d78948 100755
--- a/test/functional/rpc_blockchain.py
+++ b/test/functional/rpc_blockchain.py
@@ -436,7 +436,6 @@ def _test_getdifficulty(self):
 
     def _test_getnetworkhashps(self):
         self.log.info("Test getnetworkhashps")
-        hashes_per_second = self.nodes[0].getnetworkhashps()
         assert_raises_rpc_error(
             -3,
             textwrap.dedent("""
@@ -448,7 +447,33 @@ def _test_getnetworkhashps(self):
             """).strip(),
             lambda: self.nodes[0].getnetworkhashps("a", []),
         )
+        assert_raises_rpc_error(
+            -8,
+            "Block does not exist at specified height",
+            lambda: self.nodes[0].getnetworkhashps(100, self.nodes[0].getblockcount() + 1),
+        )
+        assert_raises_rpc_error(
+            -8,
+            "Block does not exist at specified height",
+            lambda: self.nodes[0].getnetworkhashps(100, -10),
+        )
+        assert_raises_rpc_error(
+            -8,
+            "Invalid nblocks. Must be a positive number or -1.",
+            lambda: self.nodes[0].getnetworkhashps(-100),
+        )
+        assert_raises_rpc_error(
+            -8,
+            "Invalid nblocks. Must be a positive number or -1.",
+            lambda: self.nodes[0].getnetworkhashps(0),
+        )
+
+        # Genesis block height estimate should return 0
+        hashes_per_second = self.nodes[0].getnetworkhashps(100, 0)
+        assert_equal(hashes_per_second, 0)
+
         # This should be 2 hashes every 10 minutes or 1/300
+        hashes_per_second = self.nodes[0].getnetworkhashps()
         assert abs(hashes_per_second * 300 - 1) < 0.0001
 
     def _test_stopatheight(self):
diff --git a/test/functional/rpc_psbt.py b/test/functional/rpc_psbt.py
index 60df48f025cfc..d9d8eaf759f65 100755
--- a/test/functional/rpc_psbt.py
+++ b/test/functional/rpc_psbt.py
@@ -889,7 +889,7 @@ def test_psbt_input_keys(psbt_input, keys):
             assert_equal(comb_psbt, psbt)
 
         self.log.info("Test walletprocesspsbt raises if an invalid sighashtype is passed")
-        assert_raises_rpc_error(-8, "all is not a valid sighash parameter.", self.nodes[0].walletprocesspsbt, psbt, sighashtype="all")
+        assert_raises_rpc_error(-8, "'all' is not a valid sighash parameter.", self.nodes[0].walletprocesspsbt, psbt, sighashtype="all")
 
         self.log.info("Test decoding PSBT with per-input preimage types")
         # note that the decodepsbt RPC doesn't check whether preimages and hashes match
@@ -996,7 +996,7 @@ def test_psbt_input_keys(psbt_input, keys):
         self.nodes[2].sendrawtransaction(processed_psbt['hex'])
 
         self.log.info("Test descriptorprocesspsbt raises if an invalid sighashtype is passed")
-        assert_raises_rpc_error(-8, "all is not a valid sighash parameter.", self.nodes[2].descriptorprocesspsbt, psbt, [descriptor], sighashtype="all")
+        assert_raises_rpc_error(-8, "'all' is not a valid sighash parameter.", self.nodes[2].descriptorprocesspsbt, psbt, [descriptor], sighashtype="all")
 
 
 if __name__ == '__main__':
diff --git a/test/functional/rpc_signrawtransactionwithkey.py b/test/functional/rpc_signrawtransactionwithkey.py
index 0913f5057e510..268584331ec32 100755
--- a/test/functional/rpc_signrawtransactionwithkey.py
+++ b/test/functional/rpc_signrawtransactionwithkey.py
@@ -124,7 +124,7 @@ def invalid_sighashtype_test(self):
         self.log.info("Test signing transaction with invalid sighashtype")
         tx = self.nodes[0].createrawtransaction(INPUTS, OUTPUTS)
         privkeys = [self.nodes[0].get_deterministic_priv_key().key]
-        assert_raises_rpc_error(-8, "all is not a valid sighash parameter.", self.nodes[0].signrawtransactionwithkey, tx, privkeys, sighashtype="all")
+        assert_raises_rpc_error(-8, "'all' is not a valid sighash parameter.", self.nodes[0].signrawtransactionwithkey, tx, privkeys, sighashtype="all")
 
     def run_test(self):
         self.successful_signing_test()
diff --git a/test/functional/rpc_uptime.py b/test/functional/rpc_uptime.py
index cb99e483ece29..f8df59d02ad39 100755
--- a/test/functional/rpc_uptime.py
+++ b/test/functional/rpc_uptime.py
@@ -23,7 +23,7 @@ def run_test(self):
         self._test_uptime()
 
     def _test_negative_time(self):
-        assert_raises_rpc_error(-8, "Mocktime cannot be negative: -1.", self.nodes[0].setmocktime, -1)
+        assert_raises_rpc_error(-8, "Mocktime must be in the range [0, 9223372036], not -1.", self.nodes[0].setmocktime, -1)
 
     def _test_uptime(self):
         wait_time = 10
diff --git a/test/functional/wallet_signrawtransactionwithwallet.py b/test/functional/wallet_signrawtransactionwithwallet.py
index d560dfdc11cad..17aef1ca9715e 100755
--- a/test/functional/wallet_signrawtransactionwithwallet.py
+++ b/test/functional/wallet_signrawtransactionwithwallet.py
@@ -56,7 +56,7 @@ def test_with_lock_outputs(self):
 
     def test_with_invalid_sighashtype(self):
         self.log.info("Test signrawtransactionwithwallet raises if an invalid sighashtype is passed")
-        assert_raises_rpc_error(-8, "all is not a valid sighash parameter.", self.nodes[0].signrawtransactionwithwallet, hexstring=RAW_TX, sighashtype="all")
+        assert_raises_rpc_error(-8, "'all' is not a valid sighash parameter.", self.nodes[0].signrawtransactionwithwallet, hexstring=RAW_TX, sighashtype="all")
 
     def script_verification_error_test(self):
         """Create and sign a raw transaction with valid (vin 0), invalid (vin 1) and one missing (vin 2) input script.