mirror of
https://github.com/tendermint/tendermint.git
synced 2026-10-01 04:05:45 +00:00
linter: (1/2) enable errcheck (#5064)
## Description
partially cleanup in preparation for errcheck
i ignored a bunch of defer errors in tests but with the update to go 1.14 we can use `t.Cleanup(func() { if err := <>; err != nil {..}}` to cover those errors, I will do this in pr number two of enabling errcheck.
ref #5059
This commit is contained in:
@@ -61,7 +61,7 @@ func (a ABCIApp) BroadcastTxAsync(tx types.Tx) (*ctypes.ResultBroadcastTx, error
|
||||
c := a.App.CheckTx(abci.RequestCheckTx{Tx: tx})
|
||||
// and this gets written in a background thread...
|
||||
if !c.IsErr() {
|
||||
go func() { a.App.DeliverTx(abci.RequestDeliverTx{Tx: tx}) }() // nolint: errcheck
|
||||
go func() { a.App.DeliverTx(abci.RequestDeliverTx{Tx: tx}) }()
|
||||
}
|
||||
return &ctypes.ResultBroadcastTx{
|
||||
Code: c.Code,
|
||||
@@ -76,7 +76,7 @@ func (a ABCIApp) BroadcastTxSync(tx types.Tx) (*ctypes.ResultBroadcastTx, error)
|
||||
c := a.App.CheckTx(abci.RequestCheckTx{Tx: tx})
|
||||
// and this gets written in a background thread...
|
||||
if !c.IsErr() {
|
||||
go func() { a.App.DeliverTx(abci.RequestDeliverTx{Tx: tx}) }() // nolint: errcheck
|
||||
go func() { a.App.DeliverTx(abci.RequestDeliverTx{Tx: tx}) }()
|
||||
}
|
||||
return &ctypes.ResultBroadcastTx{
|
||||
Code: c.Code,
|
||||
|
||||
Reference in New Issue
Block a user