chore: enable errcheck linter (#16406)
This commit is contained in:
@@ -102,7 +102,10 @@ func NewIntegrationApp(
|
||||
}
|
||||
}
|
||||
|
||||
bApp.Commit()
|
||||
_, err := bApp.Commit()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
ctx := sdkCtx.WithBlockHeader(cmtproto.Header{ChainID: appName}).WithIsCheckTx(true)
|
||||
|
||||
@@ -129,7 +132,12 @@ func (app *App) RunMsg(msg sdk.Msg, option ...Option) (*codectypes.Any, error) {
|
||||
}
|
||||
|
||||
if cfg.AutomaticCommit {
|
||||
defer app.Commit()
|
||||
defer func() {
|
||||
_, err := app.Commit()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
if cfg.AutomaticFinalizeBlock {
|
||||
|
||||
@@ -744,7 +744,7 @@ func (n *Network) WaitForHeightWithTimeout(h int64, t time.Duration) (int64, err
|
||||
// blocks has been reached.
|
||||
func (n *Network) RetryForBlocks(retryFunc func() error, blocks int) error {
|
||||
for i := 0; i < blocks; i++ {
|
||||
n.WaitForNextBlock()
|
||||
_ = n.WaitForNextBlock()
|
||||
err := retryFunc()
|
||||
if err == nil {
|
||||
return nil
|
||||
|
||||
@@ -118,6 +118,8 @@ func initTestStores(t *testing.T) (storetypes.KVStore, storetypes.KVStore) {
|
||||
key2 := storetypes.NewKVStoreKey("store2")
|
||||
require.NotPanics(t, func() { ms.MountStoreWithDB(key1, storetypes.StoreTypeIAVL, db) })
|
||||
require.NotPanics(t, func() { ms.MountStoreWithDB(key2, storetypes.StoreTypeIAVL, db) })
|
||||
require.NotPanics(t, func() { ms.LoadLatestVersion() })
|
||||
require.NotPanics(t, func() {
|
||||
_ = ms.LoadLatestVersion()
|
||||
})
|
||||
return ms.GetKVStore(key1), ms.GetKVStore(key2)
|
||||
}
|
||||
|
||||
@@ -141,8 +141,8 @@ func SignCheckDeliver(
|
||||
require.False(t, finalizeSuccess)
|
||||
}
|
||||
|
||||
app.Commit()
|
||||
|
||||
_, err = app.Commit()
|
||||
require.NoError(t, err)
|
||||
gInfo := sdk.GasInfo{GasWanted: uint64(txResult.GasWanted), GasUsed: uint64(txResult.GasUsed)}
|
||||
txRes := sdk.Result{Data: txResult.Data, Log: txResult.Log, Events: txResult.Events}
|
||||
if finalizeSuccess {
|
||||
|
||||
Reference in New Issue
Block a user