[refactor] Restructure logic to check for addr relay.

We previously identified if we relay addresses to the connection by checking
for the existence of the m_addr_known data structure. With this commit, we
answer this question based on the connection type.

IsAddrRelayPeer() checked for the existence of the m_addr_known
This commit is contained in:
Amiti Uttarwar
2020-08-10 14:48:54 -07:00
parent a6ab1e81f9
commit dff16b184b
4 changed files with 17 additions and 11 deletions

View File

@@ -147,7 +147,7 @@ void test_one_input(const std::vector<uint8_t>& buffer)
const int ref_count = node.GetRefCount();
assert(ref_count >= 0);
(void)node.GetSendVersion();
(void)node.IsAddrRelayPeer();
(void)node.RelayAddrsWithConn();
const NetPermissionFlags net_permission_flags = fuzzed_data_provider.ConsumeBool() ?
fuzzed_data_provider.PickValueInArray<NetPermissionFlags>({NetPermissionFlags::PF_NONE, NetPermissionFlags::PF_BLOOMFILTER, NetPermissionFlags::PF_RELAY, NetPermissionFlags::PF_FORCERELAY, NetPermissionFlags::PF_NOBAN, NetPermissionFlags::PF_MEMPOOL, NetPermissionFlags::PF_ISIMPLICIT, NetPermissionFlags::PF_ALL}) :