This repository was archived by the owner on Oct 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Enable aleth-bootnode to connect to official Ethereum bootnodes #5485
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
ffea09f
Enable aleth-bootnode to connect to bootnodes
halfalicious bad979f
Move bootnodes list from Host to Common
halfalicious c63bce4
Update defaultBootNodes() to return reference
halfalicious 26dd103
Remove unnecessary std prefix in libp2p\Common.cpp
halfalicious File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,7 +15,7 @@ using namespace std; | |
| const NodeIPEndpoint UnspecifiedNodeIPEndpoint = NodeIPEndpoint{{}, 0, 0}; | ||
| const Node UnspecifiedNode = Node{{}, UnspecifiedNodeIPEndpoint}; | ||
|
|
||
| bool isPublicAddress(std::string const& _addressToCheck) | ||
| bool isPublicAddress(string const& _addressToCheck) | ||
| { | ||
| return _addressToCheck.empty() ? false : | ||
| isPublicAddress(bi::address::from_string(_addressToCheck)); | ||
|
|
@@ -69,7 +69,7 @@ bool isPrivateAddress(bi::address const& _addressToCheck) | |
| return false; | ||
| } | ||
|
|
||
| bool isPrivateAddress(std::string const& _addressToCheck) | ||
| bool isPrivateAddress(string const& _addressToCheck) | ||
| { | ||
| return _addressToCheck.empty() ? false : | ||
| isPrivateAddress(bi::address::from_string(_addressToCheck)); | ||
|
|
@@ -89,13 +89,13 @@ bool isLocalHostAddress(bi::address const& _addressToCheck) | |
| return c_rejectAddresses.find(_addressToCheck) != c_rejectAddresses.end(); | ||
| } | ||
|
|
||
| bool isLocalHostAddress(std::string const& _addressToCheck) | ||
| bool isLocalHostAddress(string const& _addressToCheck) | ||
| { | ||
| return _addressToCheck.empty() ? false : | ||
| isLocalHostAddress(bi::address::from_string(_addressToCheck)); | ||
| } | ||
|
|
||
| std::string reasonOf(DisconnectReason _r) | ||
| string reasonOf(DisconnectReason _r) | ||
| { | ||
| switch (_r) | ||
| { | ||
|
|
@@ -216,7 +216,7 @@ NodeIPEndpoint NodeSpec::nodeIPEndpoint() const | |
| return {Network::resolveHost(m_address).address(), m_udpPort, m_tcpPort}; | ||
| } | ||
|
|
||
| std::string NodeSpec::enode() const | ||
| string NodeSpec::enode() const | ||
| { | ||
| string ret = m_address; | ||
|
|
||
|
|
@@ -238,7 +238,7 @@ bool NodeSpec::isValid() const | |
| return m_id && !m_address.empty(); | ||
| } | ||
|
|
||
| std::ostream& operator<<(std::ostream& _out, NodeIPEndpoint const& _ep) | ||
| ostream& operator<<(ostream& _out, NodeIPEndpoint const& _ep) | ||
| { | ||
| _out << _ep.address() << ':' << _ep.tcpPort(); | ||
| // It rarely happens that TCP and UDP are different, so save space | ||
|
|
@@ -253,5 +253,24 @@ boost::log::formatting_ostream& operator<<(boost::log::formatting_ostream& _log, | |
| return _log << _node.id << '@' << _node.endpoint; | ||
| } | ||
|
|
||
| unordered_map<Public, string>& defaultBootNodes() | ||
| { | ||
| static unordered_map<Public, string> ret = { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, does it have to be a map at all? I think an |
||
| // Mainnet: | ||
| { Public("a979fb575495b8d6db44f750317d0f4622bf4c2aa3365d6af7c284339968eef29b69ad0dce72a4d8db5ebb4968de0e3bec910127f134779fbcb0cb6d3331163c"), "52.16.188.185:30303" }, | ||
| { Public("3f1d12044546b76342d59d4a05532c14b85aa669704bfe1f864fe079415aa2c02d743e03218e57a33fb94523adb54032871a6c51b2cc5514cb7c7e35b3ed0a99"), "13.93.211.84:30303" }, | ||
| { Public("78de8a0916848093c73790ead81d1928bec737d565119932b98c6b100d944b7a95e94f847f689fc723399d2e31129d182f7ef3863f2b4c820abbf3ab2722344d"), "191.235.84.50:30303" }, | ||
| { Public("158f8aab45f6d19c6cbf4a089c2670541a8da11978a2f90dbf6a502a4a3bab80d288afdbeb7ec0ef6d92de563767f3b1ea9e8e334ca711e9f8e2df5a0385e8e6"), "13.75.154.138:30303" }, | ||
| { Public("1118980bf48b0a3640bdba04e0fe78b1add18e1cd99bf22d53daac1fd9972ad650df52176e7c7d89d1114cfef2bc23a2959aa54998a46afcf7d91809f0855082"), "52.74.57.123:30303" }, | ||
| // Ropsten: | ||
| { Public("30b7ab30a01c124a6cceca36863ece12c4f5fa68e3ba9b0b51407ccc002eeed3b3102d20a88f1c1d3c3154e2449317b8ef95090e77b312d5cc39354f86d5d606"), "52.176.7.10:30303" }, | ||
| { Public("865a63255b3bb68023b6bffd5095118fcc13e79dcf014fe4e47e065c350c7cc72af2e53eff895f11ba1bbb6a2b33271c1116ee870f266618eadfc2e78aa7349c"), "52.176.100.77:30303" }, | ||
| { Public("6332792c4a00e3e4ee0926ed89e0d27ef985424d97b6a45bf0f23e51f0dcb5e66b875777506458aea7af6f9e4ffb69f43f3778ee73c81ed9d34c51c4b16b0b0f"), "52.232.243.152:30303" }, | ||
| { Public("94c15d1b9e2fe7ce56e458b9a3b672ef11894ddedd0c6f247e0f1d3487f52b66208fb4aeb8179fce6e3a749ea93ed147c37976d67af557508d199d9594c35f09"), "192.81.208.223:30303" }, | ||
| }; | ||
|
|
||
| return ret; | ||
| } | ||
|
|
||
| } // namespace p2p | ||
| } // namespace dev | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.