mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
Prysmctl Command to Request Beacon Nodes for Block Ranges Over P2P (#11035)
* first * attempt p2p connect send tool * attempt * stream registration * trying to register * attempt * workinnnn * begin * p2p prysmctl tool * ignore * fix * delete deprecated * p2p smaller iface surface area * further p2p refactor * gaz * better logging * process * all functionality * fix up * rhandle * v2 req * cmd * send sub * v1 handle * show head slot * cmd * cmd lib * gazelle fix * bazel * gaz * work on the handshake items * prevent dial to self * add config awareness * gaz * inferring host addrs from p2p * initialize data mappings * add own mock * fix up logic * gaz * add img * gaz * add images * builds * builds * nishant feedback: Co-authored-by: Nishant Das <nishdas93@gmail.com>
This commit is contained in:
@@ -6,6 +6,15 @@ import (
|
||||
"sort"
|
||||
)
|
||||
|
||||
// IPAddr gets the external ipv4 address and converts into a libp2p formatted value.
|
||||
func IPAddr() net.IP {
|
||||
ip, err := ExternalIP()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return net.ParseIP(ip)
|
||||
}
|
||||
|
||||
// ExternalIPv4 returns the first IPv4 available.
|
||||
func ExternalIPv4() (string, error) {
|
||||
ips, err := ipAddrs()
|
||||
|
||||
Reference in New Issue
Block a user