Browse Source

Don't use Node, as can't be copioed.

cl-refactor
subtly 9 years ago
parent
commit
4d380c7a2d
  1. 10
      eth/main.cpp

10
eth/main.cpp

@ -359,7 +359,7 @@ int main(int argc, char** argv)
unsigned peers = 11;
unsigned peerStretch = 7;
std::map<NodeId, Node> preferredNodes;
std::map<NodeId, pair<NodeIPEndpoint,bool>> preferredNodes;
bool bootstrap = false;
bool disableDiscovery = false;
bool pinning = false;
@ -766,7 +766,7 @@ int main(int argc, char** argv)
Public publicKey(fromHex(pubk));
try
{
preferredNodes[publicKey] = Node(pubk, NodeIPEndpoint(bi::address(hostIP), port, port), required);
preferredNodes[publicKey] = make_pair(NodeIPEndpoint(bi::address::from_string(hostIP), port, port), required);
}
catch (...)
{
@ -1110,10 +1110,10 @@ int main(int argc, char** argv)
#endif
for (auto const& p: preferredNodes)
if (p.second.required)
web3.requirePeer(p.first, p.second.endpoint);
if (p.second.second)
web3.requirePeer(p.first, p.second.first);
else
web3.addNode(p.first, p.second.endpoint);
web3.addNode(p.first, p.second.first);
if (bootstrap)
for (auto const& i: Host::pocHosts())

Loading…
Cancel
Save