Skip to content

Commit 181ab17

Browse files
committed
Recognise temporary REPLACE_BY_FEE service bit
1 parent 20d5f9b commit 181ab17

File tree

4 files changed

+5
-1
lines changed

4 files changed

+5
-1
lines changed

src/protocol.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ static std::string serviceFlagToStr(size_t bit)
9999
case NODE_COMPACT_FILTERS: return "COMPACT_FILTERS";
100100
case NODE_NETWORK_LIMITED: return "NETWORK_LIMITED";
101101
case NODE_P2P_V2: return "P2P_V2";
102+
case NODE_REPLACE_BY_FEE: return "REPLACE_BY_FEE?";
102103
// Not using default, so we get warned when a case is missing
103104
}
104105

src/protocol.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,8 @@ enum ServiceFlags : uint64_t {
336336
// collisions and other cases where nodes may be advertising a service they
337337
// do not actually support. Other service bits should be allocated via the
338338
// BIP process.
339+
340+
NODE_REPLACE_BY_FEE = (1 << 26),
339341
};
340342

341343
/**

test/functional/rpc_net.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def assert_net_servicesnames(servicesflag, servicenames):
3737
"""
3838
servicesflag_generated = 0
3939
for servicename in servicenames:
40-
servicesflag_generated |= getattr(test_framework.messages, 'NODE_' + servicename)
40+
servicesflag_generated |= getattr(test_framework.messages, 'NODE_' + servicename.rstrip('?'))
4141
assert servicesflag_generated == servicesflag
4242

4343

test/functional/test_framework/messages.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
NODE_COMPACT_FILTERS = (1 << 6)
5454
NODE_NETWORK_LIMITED = (1 << 10)
5555
NODE_P2P_V2 = (1 << 11)
56+
NODE_REPLACE_BY_FEE = (1 << 26)
5657

5758
MSG_TX = 1
5859
MSG_BLOCK = 2

0 commit comments

Comments
 (0)