|
@ -668,17 +668,20 @@ bytes Host::saveNetwork() const |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
auto state = m_nodeTable->snapshot(); |
|
|
if (!!m_nodeTable) |
|
|
state.sort(); |
|
|
|
|
|
for (auto const& s: state) |
|
|
|
|
|
{ |
|
|
{ |
|
|
network.appendList(3); |
|
|
auto state = m_nodeTable->snapshot(); |
|
|
if (s.endpoint.tcp.address().is_v4()) |
|
|
state.sort(); |
|
|
network << s.endpoint.tcp.address().to_v4().to_bytes(); |
|
|
for (auto const& s: state) |
|
|
else |
|
|
{ |
|
|
network << s.endpoint.tcp.address().to_v6().to_bytes(); |
|
|
network.appendList(3); |
|
|
network << s.endpoint.tcp.port() << s.id; |
|
|
if (s.endpoint.tcp.address().is_v4()) |
|
|
count++; |
|
|
network << s.endpoint.tcp.address().to_v4().to_bytes(); |
|
|
|
|
|
else |
|
|
|
|
|
network << s.endpoint.tcp.address().to_v6().to_bytes(); |
|
|
|
|
|
network << s.endpoint.tcp.port() << s.id; |
|
|
|
|
|
count++; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
RLPStream ret(3); |
|
|
RLPStream ret(3); |
|
|