Recognise temporary REPLACE_BY_FEE service bit

This commit is contained in:
Luke Dashjr 2016-02-12 23:40:02 +00:00
parent 20d5f9b1eb
commit 181ab17747
4 changed files with 5 additions and 1 deletions

View File

@ -99,6 +99,7 @@ static std::string serviceFlagToStr(size_t bit)
case NODE_COMPACT_FILTERS: return "COMPACT_FILTERS";
case NODE_NETWORK_LIMITED: return "NETWORK_LIMITED";
case NODE_P2P_V2: return "P2P_V2";
case NODE_REPLACE_BY_FEE: return "REPLACE_BY_FEE?";
// Not using default, so we get warned when a case is missing
}

View File

@ -336,6 +336,8 @@ enum ServiceFlags : uint64_t {
// collisions and other cases where nodes may be advertising a service they
// do not actually support. Other service bits should be allocated via the
// BIP process.
NODE_REPLACE_BY_FEE = (1 << 26),
};
/**

View File

@ -37,7 +37,7 @@ def assert_net_servicesnames(servicesflag, servicenames):
"""
servicesflag_generated = 0
for servicename in servicenames:
servicesflag_generated |= getattr(test_framework.messages, 'NODE_' + servicename)
servicesflag_generated |= getattr(test_framework.messages, 'NODE_' + servicename.rstrip('?'))
assert servicesflag_generated == servicesflag

View File

@ -53,6 +53,7 @@ NODE_WITNESS = (1 << 3)
NODE_COMPACT_FILTERS = (1 << 6)
NODE_NETWORK_LIMITED = (1 << 10)
NODE_P2P_V2 = (1 << 11)
NODE_REPLACE_BY_FEE = (1 << 26)
MSG_TX = 1
MSG_BLOCK = 2