diff --git a/blockmanager.go b/blockmanager.go index f814fbc74..1bc0a8063 100644 --- a/blockmanager.go +++ b/blockmanager.go @@ -490,9 +490,6 @@ func (b *blockManager) handleNotifyMsg(notification *btcchain.Notification) { case btcchain.NTBlockAccepted: // Don't relay if we are not current. Other peers that are // current should already know about it. - // TODO(davec): This should really be over in RelayInventory - // in server to stop all relays, but chain is not concurrent - // safe at this time, so call it here to single thread access. if !b.blockChain.IsCurrent() { return } diff --git a/btcd.go b/btcd.go index 30e122505..5c5217ba8 100644 --- a/btcd.go +++ b/btcd.go @@ -113,8 +113,7 @@ func btcdMain() error { } // Perform upgrades to btcd as new versions require it. - err = doUpgrades() - if err != nil { + if err := doUpgrades(); err != nil { log.Errorf("%v", err) return err } @@ -151,14 +150,12 @@ func main() { runtime.GOMAXPROCS(runtime.NumCPU()) // Up some limits. - err := setLimits() - if err != nil { + if err := setLimits(); err != nil { os.Exit(1) } // Work around defer not working after os.Exit() - err = btcdMain() - if err != nil { + if err := btcdMain(); err != nil { os.Exit(1) } } diff --git a/server.go b/server.go index 4d7fad66f..073a77dc7 100644 --- a/server.go +++ b/server.go @@ -162,9 +162,6 @@ func (s *server) handleBanPeerMsg(banned map[string]time.Time, p *peer) { // handleRelayInvMsg deals with relaying inventory to peers that are not already // known to have it. It is invoked from the peerHandler goroutine. func (s *server) handleRelayInvMsg(peers *list.List, iv *btcwire.InvVect) { - // TODO(davec): Don't relay inventory during the initial block chain - // download. Move the check out of the block manager. - // Loop through all connected peers and relay the inventory to those // which are not already known to have it. for e := peers.Front(); e != nil; e = e.Next() {