MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / GetAddrBytes

Method GetAddrBytes

src/netaddress.cpp:692–700  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

690}
691
692std::vector<unsigned char> CNetAddr::GetAddrBytes() const
693{
694 if (IsAddrV1Compatible()) {
695 uint8_t serialized[V1_SERIALIZATION_SIZE];
696 SerializeV1Array(serialized);
697 return {std::begin(serialized), std::end(serialized)};
698 }
699 return std::vector<unsigned char>(m_addr.begin(), m_addr.end());
700}
701
702// private extensions to enum Network, only returned by GetExtNetwork,
703// and only used in GetReachabilityFrom

Callers 7

IsDiscouragedMethod · 0.80
DiscourageMethod · 0.80
GetGroupMethod · 0.80
GetMappedASMethod · 0.80
ConnectNodeMethod · 0.80
operator==Method · 0.80

Calls 4

beginFunction · 0.85
endFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by 1

operator==Method · 0.64