mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-11 20:31:20 +00:00
lil fixes
This commit is contained in:
committed by
Ethan Buchman
parent
7ad8a8ab55
commit
d033470817
@ -371,7 +371,7 @@ func (a *AddrBook) loadFromFile(filePath string) bool {
|
||||
if err != nil {
|
||||
cmn.PanicCrisis(cmn.Fmt("Error opening file %s: %v", filePath, err))
|
||||
}
|
||||
defer r.Close() // nolint (errcheck)
|
||||
defer r.Close() // nolint: errcheck
|
||||
aJSON := &addrBookJSON{}
|
||||
dec := json.NewDecoder(r)
|
||||
err = dec.Decode(aJSON)
|
||||
|
@ -184,7 +184,7 @@ func (c *MConnection) OnStop() {
|
||||
if c.quit != nil {
|
||||
close(c.quit)
|
||||
}
|
||||
c.conn.Close() // nolint (errcheck)
|
||||
c.conn.Close() // nolint: errcheck
|
||||
// We can't close pong safely here because
|
||||
// recvRoutine may write to it after we've stopped.
|
||||
// Though it doesn't need to get closed at all,
|
||||
|
@ -117,7 +117,7 @@ func (l *DefaultListener) OnStart() error {
|
||||
|
||||
func (l *DefaultListener) OnStop() {
|
||||
l.BaseService.OnStop()
|
||||
l.listener.Close() // nolint (errcheck)
|
||||
l.listener.Close() // nolint: errcheck
|
||||
}
|
||||
|
||||
// Accept connections and pass on the channel
|
||||
|
@ -302,7 +302,7 @@ func shareAuthSignature(sc *SecretConnection, pubKey crypto.PubKeyEd25519, signa
|
||||
// sha256
|
||||
func hash32(input []byte) (res *[32]byte) {
|
||||
hasher := sha256.New()
|
||||
_, _ = hasher.Write(input) // ignoring error
|
||||
_, _ = hasher.Write(input) // error ignored
|
||||
resSlice := hasher.Sum(nil)
|
||||
res = new([32]byte)
|
||||
copy(res[:], resSlice)
|
||||
@ -312,7 +312,7 @@ func hash32(input []byte) (res *[32]byte) {
|
||||
// We only fill in the first 20 bytes with ripemd160
|
||||
func hash24(input []byte) (res *[24]byte) {
|
||||
hasher := ripemd160.New()
|
||||
_, _ = hasher.Write(input) // ignoring error
|
||||
_, _ = hasher.Write(input) // error ignored
|
||||
resSlice := hasher.Sum(nil)
|
||||
res = new([24]byte)
|
||||
copy(res[:], resSlice)
|
||||
|
@ -105,7 +105,7 @@ func TestWSClientReconnectsAfterWriteFailure(t *testing.T) {
|
||||
|
||||
// hacky way to abort the connection before write
|
||||
if err := c.conn.Close(); err != nil {
|
||||
panic(err)
|
||||
t.Error(err)
|
||||
}
|
||||
|
||||
// results in WS write error, the client should resend on reconnect
|
||||
|
Reference in New Issue
Block a user