more of that sweet staticcheck goodness

This commit is contained in:
whyrusleeping
2019-12-04 18:04:09 -08:00
parent a45fe8a7f9
commit 613a0a05a0
14 changed files with 18 additions and 29 deletions
+1 -1
View File
@@ -108,7 +108,7 @@ func (bss *BlockSyncService) HandleStream(s inet.Stream) {
}
func (bss *BlockSyncService) processRequest(ctx context.Context, req *BlockSyncRequest) (*BlockSyncResponse, error) {
ctx, span := trace.StartSpan(ctx, "blocksync.ProcessRequest")
_, span := trace.StartSpan(ctx, "blocksync.ProcessRequest")
defer span.End()
opts := ParseBSOptions(req.Options)
+2 -3
View File
@@ -12,9 +12,9 @@ import (
blocks "github.com/ipfs/go-block-format"
bserv "github.com/ipfs/go-blockservice"
"github.com/ipfs/go-cid"
host "github.com/libp2p/go-libp2p-core/host"
inet "github.com/libp2p/go-libp2p-core/network"
"github.com/libp2p/go-libp2p-core/peer"
host "github.com/libp2p/go-libp2p-host"
"go.opencensus.io/trace"
"golang.org/x/xerrors"
@@ -28,8 +28,7 @@ type BlockSync struct {
bserv bserv.BlockService
host host.Host
syncPeersLk sync.Mutex
syncPeers *bsPeerTracker
syncPeers *bsPeerTracker
}
func NewBlockSyncClient(bserv dtypes.ChainBlockService, h host.Host) *BlockSync {