v29.4-roots.4 · Commit 3: [PATCH 03/37] policy: restore conservative relay and network controls
src/test/denialofservice_tests.cpp
Before: src/test/denialofservice_tests.cpp · After: src/test/denialofservice_tests.cpp
File metadata
index 9ee7e9c9fe24bafa9790444e81e33121364d8a96..3bb164eac9e8cec75219a7605343d735756c66ac 100644
Download original patch · Release notes
Diff rows 1–54 of 54. Line numbers refer to the original before/after files.
+ Added− RemovedUnmarked lines are context.
Scroll the code area horizontally to read long lines. The two line-number columns refer to before and after.
src/test/denialofservice_tests.cpp
CHANGED
|
@@ -62,7 +62,8 @@ BOOST_AUTO_TEST_CASE(outbound_slow_chain_eviction)
|
|
|
62
62
|
CAddress(),
|
|
63
63
|
/*addrNameIn=*/"",
|
|
64
64
|
ConnectionType::OUTBOUND_FULL_RELAY,
|
|
65
|
-
/*inbound_onion=*/false};
|
|
65
|
+
/*inbound_onion=*/false,
|
|
66
|
+
/*network_key=*/0};
|
|
66
67
|
|
|
67
68
|
connman.Handshake(
|
|
68
69
|
/*node=*/dummyNode1,
|
|
@@ -128,7 +129,8 @@ void AddRandomOutboundPeer(NodeId& id, std::vector<CNode*>& vNodes, PeerManager&
|
|
|
128
129
|
CAddress(),
|
|
129
130
|
/*addrNameIn=*/"",
|
|
130
131
|
connType,
|
|
131
|
-
/*inbound_onion=*/false});
|
|
132
|
+
/*inbound_onion=*/false,
|
|
133
|
+
/*network_key=*/0});
|
|
132
134
|
CNode &node = *vNodes.back();
|
|
133
135
|
node.SetCommonVersion(PROTOCOL_VERSION);
|
|
134
136
|
|
|
@@ -327,7 +329,8 @@ BOOST_AUTO_TEST_CASE(peer_discouragement)
|
|
|
327
329
|
CAddress(),
|
|
328
330
|
/*addrNameIn=*/"",
|
|
329
331
|
ConnectionType::INBOUND,
|
|
330
|
-
/*inbound_onion=*/false};
|
|
332
|
+
/*inbound_onion=*/false,
|
|
333
|
+
/*network_key=*/1};
|
|
331
334
|
nodes[0]->SetCommonVersion(PROTOCOL_VERSION);
|
|
332
335
|
peerLogic->InitializeNode(*nodes[0], NODE_NETWORK);
|
|
333
336
|
nodes[0]->fSuccessfullyConnected = true;
|
|
@@ -347,7 +350,8 @@ BOOST_AUTO_TEST_CASE(peer_discouragement)
|
|
|
347
350
|
CAddress(),
|
|
348
351
|
/*addrNameIn=*/"",
|
|
349
352
|
ConnectionType::INBOUND,
|
|
350
|
-
/*inbound_onion=*/false};
|
|
353
|
+
/*inbound_onion=*/false,
|
|
354
|
+
/*network_key=*/1};
|
|
351
355
|
nodes[1]->SetCommonVersion(PROTOCOL_VERSION);
|
|
352
356
|
peerLogic->InitializeNode(*nodes[1], NODE_NETWORK);
|
|
353
357
|
nodes[1]->fSuccessfullyConnected = true;
|
|
@@ -377,7 +381,8 @@ BOOST_AUTO_TEST_CASE(peer_discouragement)
|
|
|
377
381
|
CAddress(),
|
|
378
382
|
/*addrNameIn=*/"",
|
|
379
383
|
ConnectionType::OUTBOUND_FULL_RELAY,
|
|
380
|
-
/*inbound_onion=*/false};
|
|
384
|
+
/*inbound_onion=*/false,
|
|
385
|
+
/*network_key=*/2};
|
|
381
386
|
nodes[2]->SetCommonVersion(PROTOCOL_VERSION);
|
|
382
387
|
peerLogic->InitializeNode(*nodes[2], NODE_NETWORK);
|
|
383
388
|
nodes[2]->fSuccessfullyConnected = true;
|
|
@@ -419,7 +424,8 @@ BOOST_AUTO_TEST_CASE(DoS_bantime)
|
|
|
419
424
|
CAddress(),
|
|
420
425
|
/*addrNameIn=*/"",
|
|
421
426
|
ConnectionType::INBOUND,
|
|
422
|
-
/*inbound_onion=*/false};
|
|
427
|
+
/*inbound_onion=*/false,
|
|
428
|
+
/*network_key=*/1};
|
|
423
429
|
dummyNode.SetCommonVersion(PROTOCOL_VERSION);
|
|
424
430
|
peerLogic->InitializeNode(dummyNode, NODE_NETWORK);
|
|
425
431
|
dummyNode.fSuccessfullyConnected = true;
|