v29.4-roots.1 · Commit 3: [PATCH 03/13] 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. Before is on the left; after is on the right. Unified view fits narrow screens more easily.
src/test/denialofservice_tests.cpp
CHANGED
|
@@ -62,7 +62,8 @@ BOOST_AUTO_TEST_CASE(outbound_slow_chain_eviction)
|
|
| 62 |
CAddress(),
|
| 63 |
/*addrNameIn=*/"",
|
| 64 |
ConnectionType::OUTBOUND_FULL_RELAY,
|
| 65 |
-
/*inbound_onion=*/false};
|
|
|
|
| 66 |
|
| 67 |
connman.Handshake(
|
| 68 |
/*node=*/dummyNode1,
|
|
@@ -128,7 +129,8 @@ void AddRandomOutboundPeer(NodeId& id, std::vector<CNode*>& vNodes, PeerManager&
|
|
| 128 |
CAddress(),
|
| 129 |
/*addrNameIn=*/"",
|
| 130 |
connType,
|
| 131 |
-
/*inbound_onion=*/false});
|
|
|
|
| 132 |
CNode &node = *vNodes.back();
|
| 133 |
node.SetCommonVersion(PROTOCOL_VERSION);
|
| 134 |
|
|
@@ -327,7 +329,8 @@ BOOST_AUTO_TEST_CASE(peer_discouragement)
|
|
| 327 |
CAddress(),
|
| 328 |
/*addrNameIn=*/"",
|
| 329 |
ConnectionType::INBOUND,
|
| 330 |
-
/*inbound_onion=*/false};
|
|
|
|
| 331 |
nodes[0]->SetCommonVersion(PROTOCOL_VERSION);
|
| 332 |
peerLogic->InitializeNode(*nodes[0], NODE_NETWORK);
|
| 333 |
nodes[0]->fSuccessfullyConnected = true;
|
|
@@ -347,7 +350,8 @@ BOOST_AUTO_TEST_CASE(peer_discouragement)
|
|
| 347 |
CAddress(),
|
| 348 |
/*addrNameIn=*/"",
|
| 349 |
ConnectionType::INBOUND,
|
| 350 |
-
/*inbound_onion=*/false};
|
|
|
|
| 351 |
nodes[1]->SetCommonVersion(PROTOCOL_VERSION);
|
| 352 |
peerLogic->InitializeNode(*nodes[1], NODE_NETWORK);
|
| 353 |
nodes[1]->fSuccessfullyConnected = true;
|
|
@@ -377,7 +381,8 @@ BOOST_AUTO_TEST_CASE(peer_discouragement)
|
|
| 377 |
CAddress(),
|
| 378 |
/*addrNameIn=*/"",
|
| 379 |
ConnectionType::OUTBOUND_FULL_RELAY,
|
| 380 |
-
/*inbound_onion=*/false};
|
|
|
|
| 381 |
nodes[2]->SetCommonVersion(PROTOCOL_VERSION);
|
| 382 |
peerLogic->InitializeNode(*nodes[2], NODE_NETWORK);
|
| 383 |
nodes[2]->fSuccessfullyConnected = true;
|
|
@@ -419,7 +424,8 @@ BOOST_AUTO_TEST_CASE(DoS_bantime)
|
|
| 419 |
CAddress(),
|
| 420 |
/*addrNameIn=*/"",
|
| 421 |
ConnectionType::INBOUND,
|
| 422 |
-
/*inbound_onion=*/false};
|
|
|
|
| 423 |
dummyNode.SetCommonVersion(PROTOCOL_VERSION);
|
| 424 |
peerLogic->InitializeNode(dummyNode, NODE_NETWORK);
|
| 425 |
dummyNode.fSuccessfullyConnected = true;
|
|
|
|
| 62 |
CAddress(),
|
| 63 |
/*addrNameIn=*/"",
|
| 64 |
ConnectionType::OUTBOUND_FULL_RELAY,
|
| 65 |
+
/*inbound_onion=*/false,
|
| 66 |
+
/*network_key=*/0};
|
| 67 |
|
| 68 |
connman.Handshake(
|
| 69 |
/*node=*/dummyNode1,
|
|
|
|
| 129 |
CAddress(),
|
| 130 |
/*addrNameIn=*/"",
|
| 131 |
connType,
|
| 132 |
+
/*inbound_onion=*/false,
|
| 133 |
+
/*network_key=*/0});
|
| 134 |
CNode &node = *vNodes.back();
|
| 135 |
node.SetCommonVersion(PROTOCOL_VERSION);
|
| 136 |
|
|
|
|
| 329 |
CAddress(),
|
| 330 |
/*addrNameIn=*/"",
|
| 331 |
ConnectionType::INBOUND,
|
| 332 |
+
/*inbound_onion=*/false,
|
| 333 |
+
/*network_key=*/1};
|
| 334 |
nodes[0]->SetCommonVersion(PROTOCOL_VERSION);
|
| 335 |
peerLogic->InitializeNode(*nodes[0], NODE_NETWORK);
|
| 336 |
nodes[0]->fSuccessfullyConnected = true;
|
|
|
|
| 350 |
CAddress(),
|
| 351 |
/*addrNameIn=*/"",
|
| 352 |
ConnectionType::INBOUND,
|
| 353 |
+
/*inbound_onion=*/false,
|
| 354 |
+
/*network_key=*/1};
|
| 355 |
nodes[1]->SetCommonVersion(PROTOCOL_VERSION);
|
| 356 |
peerLogic->InitializeNode(*nodes[1], NODE_NETWORK);
|
| 357 |
nodes[1]->fSuccessfullyConnected = true;
|
|
|
|
| 381 |
CAddress(),
|
| 382 |
/*addrNameIn=*/"",
|
| 383 |
ConnectionType::OUTBOUND_FULL_RELAY,
|
| 384 |
+
/*inbound_onion=*/false,
|
| 385 |
+
/*network_key=*/2};
|
| 386 |
nodes[2]->SetCommonVersion(PROTOCOL_VERSION);
|
| 387 |
peerLogic->InitializeNode(*nodes[2], NODE_NETWORK);
|
| 388 |
nodes[2]->fSuccessfullyConnected = true;
|
|
|
|
| 424 |
CAddress(),
|
| 425 |
/*addrNameIn=*/"",
|
| 426 |
ConnectionType::INBOUND,
|
| 427 |
+
/*inbound_onion=*/false,
|
| 428 |
+
/*network_key=*/1};
|
| 429 |
dummyNode.SetCommonVersion(PROTOCOL_VERSION);
|
| 430 |
peerLogic->InitializeNode(dummyNode, NODE_NETWORK);
|
| 431 |
dummyNode.fSuccessfullyConnected = true;
|