mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-04 04:45:10 +02:00
refactor: De-globalize g_signals
This commit is contained in:
@@ -25,7 +25,7 @@ static void mineBlock(const node::NodeContext& node, std::chrono::seconds block_
|
||||
block.fChecked = true; // little speedup
|
||||
SetMockTime(curr_time); // process block at current time
|
||||
Assert(node.chainman->ProcessNewBlock(std::make_shared<const CBlock>(block), /*force_processing=*/true, /*min_pow_checked=*/true, nullptr));
|
||||
SyncWithValidationInterfaceQueue(); // drain events queue
|
||||
node.validation_signals->SyncWithValidationInterfaceQueue(); // drain events queue
|
||||
}
|
||||
|
||||
// Verifying when network-limited peer connections are desirable based on the node's proximity to the tip
|
||||
@@ -57,7 +57,7 @@ BOOST_AUTO_TEST_CASE(connections_desirable_service_flags)
|
||||
|
||||
// By now, we tested that the connections desirable services flags change based on the node's time proximity to the tip.
|
||||
// Now, perform the same tests for when the node receives a block.
|
||||
RegisterValidationInterface(peerman.get());
|
||||
m_node.validation_signals->RegisterValidationInterface(peerman.get());
|
||||
|
||||
// First, verify a block in the past doesn't enable limited peers connections
|
||||
// At this point, our time is (NODE_NETWORK_LIMITED_ALLOW_CONN_BLOCKS + 1) * 10 minutes ahead the tip's time.
|
||||
|
||||
Reference in New Issue
Block a user