mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-14 09:37:59 +02:00
Merge bitcoin/bitcoin#34661: ipc mining: Prevent `Assertion m_node.chainman' failed`` errors on early startup
bbc8f1e0a7ipc mining: Prevent ``Assertion `m_node.chainman' failed`` errors on early startup (Ryan Ofsky)a7cabf92e4init refactor: Only initialize node.notifications one time (Ryan Ofsky)c8e332cb33init refactor: Remove node.init accesss in AppInitInterfaces (Ryan Ofsky) Pull request description: This fixes ``Assertion `m_node.chainman' failed`` errors first reported https://github.com/bitcoin/bitcoin/issues/33994#issuecomment-3602551596 when IPC mining methods are called before ChainstateManager is loaded. The fix works by making the `Init.makeMining` method wait until chainstate data is loaded. It's probably the simplest possible fix but other alternatives like moving the wait to `Mining.createNewBlock` were discussed in the thread https://github.com/bitcoin/bitcoin/pull/34661#discussion_r2848176298 and could be implemented later without changes to clients. ACKs for top commit: Sjors: utACKbbc8f1e0a7ismaelsadeeq: ACKbbc8f1e0a7achow101: ACKbbc8f1e0a7Tree-SHA512: 3e2e4e28ccff364b2303efd06ce337a229c28609076638500acb29559f716a15ad99409c6970ce9ad91776d53e3f9d959f1bbbd144ea9a4a2fb578ddbf2da267
This commit is contained in:
@@ -68,7 +68,7 @@ struct MinerTestingSetup : public TestingSetup {
|
||||
}
|
||||
std::unique_ptr<Mining> MakeMining()
|
||||
{
|
||||
return interfaces::MakeMining(m_node);
|
||||
return interfaces::MakeMining(m_node, /*wait_loaded=*/false);
|
||||
}
|
||||
};
|
||||
} // namespace miner_tests
|
||||
|
||||
Reference in New Issue
Block a user