6 #ifndef KAGOME_NETWORK_BOOTSTRAPNODES 7 #define KAGOME_NETWORK_BOOTSTRAPNODES 9 #include <libp2p/peer/peer_info.hpp> 11 #include <boost/range/join.hpp> 28 std::set<libp2p::multi::Multiaddress>>
33 auto peer_id_base58_opt = address.getPeerId();
34 if (peer_id_base58_opt) {
36 libp2p::peer::PeerId::fromBase58(peer_id_base58_opt.value());
37 if (peer_id_res.has_value()) {
38 addresses_by_peer_id[peer_id_res.value()].emplace(address);
43 reserve(addresses_by_peer_id.size());
44 for (
auto &item : addresses_by_peer_id) {
47 .addresses = {std::make_move_iterator(item.second.begin()),
48 std::make_move_iterator(item.second.end())}});
55 #endif // KAGOME_NETWORK_BOOTSTRAPNODES BootstrapNodes & operator=(const BootstrapNodes &)=delete
BootstrapNodes(const application::AppConfiguration &app_config, const application::ChainSpec &chain_spec)
libp2p::peer::PeerInfo PeerInfo
libp2p::peer::PeerId PeerId
virtual const std::vector< libp2p::multi::Multiaddress > & bootNodes() const =0
Return ids of peer nodes of the current node.
virtual const std::vector< libp2p::multi::Multiaddress > & bootNodes() const =0