[rpc] Add connection type to getpeerinfo RPC, update tests

This commit is contained in:
Amiti Uttarwar
2020-08-12 13:57:13 -07:00
parent 49c10a9ca4
commit 395acfa83a
4 changed files with 19 additions and 0 deletions

View File

@@ -602,6 +602,8 @@ void CNode::copyStats(CNodeStats &stats, const std::vector<bool> &m_asmap)
// Leave string empty if addrLocal invalid (not filled in yet)
CService addrLocalUnlocked = GetAddrLocal();
stats.addrLocal = addrLocalUnlocked.IsValid() ? addrLocalUnlocked.ToString() : "";
stats.m_conn_type_string = ConnectionTypeAsString();
}
#undef X