v29.4-roots.1 · Commit 3: [PATCH 03/13] policy: restore conservative relay and network controls
src/net_processing.cpp
Before: src/net_processing.cpp · After: src/net_processing.cpp
File metadata
index 049812763716697b645ba5d4a6bb873e0a4511ae..de81fb24b3225c9422fbf56db9516c5669ca1f14 100644
Download original patch · Release notes
Diff rows 401–417 of 417. 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/net_processing.cpp
CHANGED
|
@@ -4871,13 +4939,13 @@ bool PeerManagerImpl::MaybeDiscourageAndDisconnect(CNode& pnode, Peer& peer) (continued)
|
|
| 4882 |
}
|
| 4883 |
|
|
@@ -5303,6 +5371,7 @@ void PeerManagerImpl::MaybeSendFeefilter(CNode& pto, Peer& peer, std::chrono::mi
|
|
| 5303 |
{
|
| 5304 |
if (m_opts.ignore_incoming_txs) return;
|
| 5305 |
if (pto.GetCommonVersion() < FEEFILTER_VERSION) return;
|
|
|
|
| 5306 |
// peers with the forcerelay permission should not filter txs to us
|
| 5307 |
if (pto.HasPermission(NetPermissionFlags::ForceRelay)) return;
|
| 5308 |
// Don't send feefilter messages to outbound block-relay-only peers since they should never announce
|
|
@@ -5648,7 +5717,7 @@ bool PeerManagerImpl::SendMessages(CNode* pto)
|
|
| 5648 |
if (tx_relay->m_next_inv_send_time < current_time) {
|
| 5649 |
fSendTrickle = true;
|
| 5650 |
if (pto->IsInboundConn()) {
|
| 5651 |
-
tx_relay->m_next_inv_send_time = NextInvToInbounds(current_time, INBOUND_INVENTORY_BROADCAST_INTERVAL);
|
| 5652 |
} else {
|
| 5653 |
tx_relay->m_next_inv_send_time = current_time + m_rng.rand_exp_duration(OUTBOUND_INVENTORY_BROADCAST_INTERVAL);
|
| 5654 |
}
|
|
|
|
| 4950 |
}
|
| 4951 |
|
|
|
|
| 5371 |
{
|
| 5372 |
if (m_opts.ignore_incoming_txs) return;
|
| 5373 |
if (pto.GetCommonVersion() < FEEFILTER_VERSION) return;
|
| 5374 |
+
if (!gArgs.GetBoolArg("-feefilter", DEFAULT_FEEFILTER)) return;
|
| 5375 |
// peers with the forcerelay permission should not filter txs to us
|
| 5376 |
if (pto.HasPermission(NetPermissionFlags::ForceRelay)) return;
|
| 5377 |
// Don't send feefilter messages to outbound block-relay-only peers since they should never announce
|
|
|
|
| 5717 |
if (tx_relay->m_next_inv_send_time < current_time) {
|
| 5718 |
fSendTrickle = true;
|
| 5719 |
if (pto->IsInboundConn()) {
|
| 5720 |
+
tx_relay->m_next_inv_send_time = NextInvToInbounds(current_time, INBOUND_INVENTORY_BROADCAST_INTERVAL, pto->m_network_key);
|
| 5721 |
} else {
|
| 5722 |
tx_relay->m_next_inv_send_time = current_time + m_rng.rand_exp_duration(OUTBOUND_INVENTORY_BROADCAST_INTERVAL);
|
| 5723 |
}
|