mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-04 04:45:10 +02:00
Make unit tests use the insecure_rand_ctx exclusively
This commit is contained in:
@@ -111,7 +111,7 @@ BOOST_AUTO_TEST_CASE(outbound_slow_chain_eviction)
|
||||
|
||||
static void AddRandomOutboundPeer(std::vector<CNode *> &vNodes, PeerLogicValidation &peerLogic)
|
||||
{
|
||||
CAddress addr(ip(GetRandInt(0xffffffff)), NODE_NONE);
|
||||
CAddress addr(ip(insecure_rand_ctx.randbits(32)), NODE_NONE);
|
||||
vNodes.emplace_back(new CNode(id++, ServiceFlags(NODE_NETWORK|NODE_WITNESS), 0, INVALID_SOCKET, addr, 0, 0, CAddress(), "", /*fInboundIn=*/ false));
|
||||
CNode &node = *vNodes.back();
|
||||
node.SetSendVersion(PROTOCOL_VERSION);
|
||||
|
||||
Reference in New Issue
Block a user