Misc cleanup.
This commit is contained in:
parent
19d28f90e6
commit
1d2c48555b
3 changed files with 3 additions and 12 deletions
|
@ -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
|
||||
}
|
||||
|
|
9
btcd.go
9
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)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Add table
Reference in a new issue