diff --git a/baseapp/abci.go b/baseapp/abci.go index 6d7883474f535..ce84668f47679 100644 --- a/baseapp/abci.go +++ b/baseapp/abci.go @@ -318,7 +318,7 @@ func (app *BaseApp) ApplySnapshotChunk(_ context.Context, req *abci.RequestApply Result: abci.ResponseApplySnapshotChunk_RETRY, RefetchChunks: []uint32{req.Index}, RejectSenders: []string{req.Sender}, - }, err + }, nil default: app.logger.Error("failed to restore snapshot", "err", err) diff --git a/baseapp/baseapp_test.go b/baseapp/baseapp_test.go index a66fd761d11d5..801e59efc99d6 100644 --- a/baseapp/baseapp_test.go +++ b/baseapp/baseapp_test.go @@ -131,12 +131,14 @@ func NewBaseAppSuiteWithSnapshots(t *testing.T, cfg SnapshotsConfig, opts ...fun txs = append(txs, txBytes) } - suite.baseApp.FinalizeBlock(context.TODO(), &abci.RequestFinalizeBlock{ + _, err := suite.baseApp.FinalizeBlock(context.TODO(), &abci.RequestFinalizeBlock{ Height: height, Txs: txs, }) + require.NoError(t, err) - suite.baseApp.Commit(context.TODO(), &abci.RequestCommit{}) + _, err = suite.baseApp.Commit(context.TODO(), &abci.RequestCommit{}) + require.NoError(t, err) // wait for snapshot to be taken, since it happens asynchronously if cfg.snapshotInterval > 0 && uint64(height)%cfg.snapshotInterval == 0 { diff --git a/baseapp/snapshot_test.go b/baseapp/snapshot_test.go index 2ae64c125720e..65b19c9192380 100644 --- a/baseapp/snapshot_test.go +++ b/baseapp/snapshot_test.go @@ -321,7 +321,7 @@ func TestABCI_ApplySnapshotChunk(t *testing.T) { Sender: "sender", }) require.NoError(t, err) - require.Equal(t, abci.ResponseApplySnapshotChunk{ + require.Equal(t, &abci.ResponseApplySnapshotChunk{ Result: abci.ResponseApplySnapshotChunk_RETRY, RefetchChunks: []uint32{0}, RejectSenders: []string{"sender"}, @@ -342,7 +342,7 @@ func TestABCI_ApplySnapshotChunk(t *testing.T) { Chunk: respChunk.Chunk, }) require.NoError(t, err) - require.Equal(t, abci.ResponseApplySnapshotChunk{ + require.Equal(t, &abci.ResponseApplySnapshotChunk{ Result: abci.ResponseApplySnapshotChunk_ACCEPT, }, respApply) }