From 0450e35d679892dc628e0bac19952c5020462f22 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Sat, 28 Apr 2018 15:19:33 -0400 Subject: [PATCH] some comments --- p2p/netaddress.go | 4 +++- p2p/pex/pex_reactor.go | 7 +------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/p2p/netaddress.go b/p2p/netaddress.go index 80b8e18bb..3e0d99d69 100644 --- a/p2p/netaddress.go +++ b/p2p/netaddress.go @@ -22,7 +22,9 @@ type NetAddress struct { ID ID `json:"id"` IP net.IP `json:"ip"` Port uint16 `json:"port"` - Name string `json:"name"` // optional DNS name + + // TODO: + // Name string `json:"name"` // optional DNS name // memoize .String() str string diff --git a/p2p/pex/pex_reactor.go b/p2p/pex/pex_reactor.go index 82b772a64..b139e4aba 100644 --- a/p2p/pex/pex_reactor.go +++ b/p2p/pex/pex_reactor.go @@ -126,9 +126,7 @@ func (r *PEXReactor) OnStart() error { } // return err if user provided a bad seed address - // NOTE: only if its an invalid address. - // If we simply fail to resovle a DNS name, - // we shouldn't exit here ... + // or a host name that we cant resolve if err := r.checkSeeds(); err != nil { return err } @@ -500,9 +498,6 @@ func (r *PEXReactor) checkSeeds() error { if lSeeds == 0 { return nil } - // TODO: don't exit the program if we simply cant resolve a DNS name. - // But if names or addresses are incorrectly speficied (ie. invalid), - // then we should return an err that causes an exit _, errs := p2p.NewNetAddressStrings(r.config.Seeds) for _, err := range errs { if err != nil {