[net] Move ConnectionType to its own file

This commit is contained in:
Cory Fields
2021-12-01 19:11:37 +00:00
committed by dergoegge
parent a3c2707039
commit c741d748d4
5 changed files with 111 additions and 92 deletions

View File

@@ -576,26 +576,6 @@ void CConnman::AddWhitelistPermissionFlags(NetPermissionFlags& flags, const CNet
}
}
std::string ConnectionTypeAsString(ConnectionType conn_type)
{
switch (conn_type) {
case ConnectionType::INBOUND:
return "inbound";
case ConnectionType::MANUAL:
return "manual";
case ConnectionType::FEELER:
return "feeler";
case ConnectionType::OUTBOUND_FULL_RELAY:
return "outbound-full-relay";
case ConnectionType::BLOCK_RELAY:
return "block-relay-only";
case ConnectionType::ADDR_FETCH:
return "addr-fetch";
} // no default case, so the compiler can warn about missing cases
assert(false);
}
CService CNode::GetAddrLocal() const
{
AssertLockNotHeld(m_addr_local_mutex);