mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
swarm/network: Add panic comment
(travis trigger take 1)
This commit is contained in:
parent
6957d135ad
commit
213fce6d39
1 changed files with 1 additions and 0 deletions
|
|
@ -229,6 +229,7 @@ func (b *Bzz) performHandshake(p *protocols.Peer, handshake *HandshakeMsg) error
|
|||
func sanitizeEnodeRemote(paddr net.Addr, baddr *BzzAddr) {
|
||||
hsSubmatch := regexpEnodeIP.FindSubmatch(baddr.UAddr)
|
||||
ip, _, err := net.SplitHostPort(paddr.String())
|
||||
// since we expect nothing else than ipv4 here, a panic on missing submatch is desired
|
||||
if err == nil && string(hsSubmatch[1]) != ip {
|
||||
remoteStr := fmt.Sprintf("@%s:%s", ip, string(hsSubmatch[2]))
|
||||
log.Debug("rewrote peer uaddr host/port", "addr", baddr)
|
||||
|
|
|
|||
Loading…
Reference in a new issue