Skip to content

Commit 9029cbb

Browse files
committed
Advertise temporary REPLACE_BY_FEE service bit (when appropriate)
1 parent 181ab17 commit 9029cbb

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/init.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1572,6 +1572,10 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
15721572
LogPrintf("* Flushing caches if available system memory drops below %s MiB\n", g_low_memory_threshold / 1024 / 1024);
15731573
}
15741574

1575+
if (mempool_opts.full_rbf) {
1576+
nLocalServices = ServiceFlags(nLocalServices | NODE_REPLACE_BY_FEE);
1577+
}
1578+
15751579
for (bool fLoaded = false; !fLoaded && !ShutdownRequested(node);) {
15761580
bilingual_str mempool_error;
15771581
node.mempool = std::make_unique<CTxMemPool>(mempool_opts, mempool_error);

test/functional/p2p_node_network_limited.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
NODE_NETWORK_LIMITED,
1515
NODE_P2P_V2,
1616
NODE_WITNESS,
17+
NODE_REPLACE_BY_FEE,
1718
msg_getdata,
1819
)
1920
from test_framework.p2p import P2PInterface
@@ -118,7 +119,7 @@ def test_avoid_requesting_historical_blocks(self):
118119
def run_test(self):
119120
node = self.nodes[0].add_p2p_connection(P2PIgnoreInv())
120121

121-
expected_services = NODE_WITNESS | NODE_NETWORK_LIMITED
122+
expected_services = NODE_WITNESS | NODE_NETWORK_LIMITED | NODE_REPLACE_BY_FEE
122123
if self.options.v2transport:
123124
expected_services |= NODE_P2P_V2
124125

0 commit comments

Comments
 (0)