les: fix linter

This commit is contained in:
rjl493456442 2020-03-10 18:11:58 +08:00
parent 6e85f25f6c
commit 51881bf76f
2 changed files with 7 additions and 7 deletions

View file

@ -637,12 +637,12 @@ type clientPeer struct {
// responseLock ensures that responses are queued in the same order as // responseLock ensures that responses are queued in the same order as
// RequestProcessed is called // RequestProcessed is called
responseLock sync.Mutex responseLock sync.Mutex
server bool server bool
invalidCount uint32 // Counter the invalid request the client peer has made. invalidCount uint32 // Counter the invalid request the client peer has made.
responseCount uint64 // Counter to generate an unique id for request processing. responseCount uint64 // Counter to generate an unique id for request processing.
errCh chan error errCh chan error
fcClient *flowcontrol.ClientNode // Server side mirror token bucket. fcClient *flowcontrol.ClientNode // Server side mirror token bucket.
} }
func newClientPeer(version int, network uint64, p *p2p.Peer, rw p2p.MsgReadWriter) *clientPeer { func newClientPeer(version int, network uint64, p *p2p.Peer, rw p2p.MsgReadWriter) *clientPeer {

View file

@ -535,7 +535,7 @@ func newClientServerEnv(t *testing.T, blocks int, protocol int, callback indexer
) )
if connect { if connect {
done := make(chan struct{}) done := make(chan struct{})
client.syncDone = func() {close(done)} client.syncDone = func() { close(done) }
cpeer, speer, err = newTestPeerPair("peer", protocol, server, client) cpeer, speer, err = newTestPeerPair("peer", protocol, server, client)
if err != nil { if err != nil {
t.Fatalf("Failed to connect testing peers %v", err) t.Fatalf("Failed to connect testing peers %v", err)