test: Make g_insecure_rand_ctx thread_local

This commit is contained in:
MarcoFalke
2018-12-13 14:33:28 -05:00
parent 9a43344430
commit faead93c6c
3 changed files with 21 additions and 23 deletions
+1 -1
View File
@@ -111,7 +111,7 @@ BOOST_AUTO_TEST_CASE(outbound_slow_chain_eviction)
static void AddRandomOutboundPeer(std::vector<CNode *> &vNodes, PeerLogicValidation &peerLogic)
{
CAddress addr(ip(insecure_rand_ctx.randbits(32)), NODE_NONE);
CAddress addr(ip(g_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);