From 5ca922598e9b66daf6da4c56719de22cdea8cdd4 Mon Sep 17 00:00:00 2001 From: Callum Waters Date: Thu, 28 Sep 2023 13:53:34 +0200 Subject: [PATCH] fix syncer_test --- statesync/syncer_test.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/statesync/syncer_test.go b/statesync/syncer_test.go index e64f01d407..e0f600c449 100644 --- a/statesync/syncer_test.go +++ b/statesync/syncer_test.go @@ -634,7 +634,6 @@ func TestSyncer_applyChunks_RejectSenders(t *testing.T) { func TestSyncer_verifyApp(t *testing.T) { boom := errors.New("boom") const appVersion = 9 - appVersionMismatchErr := errors.New("app version mismatch. Expected: 9, got: 2") s := &snapshot{Height: 3, Format: 1, Chunks: 5, Hash: []byte{1, 2, 3}, trustedAppHash: []byte("app_hash")} testcases := map[string]struct { @@ -647,11 +646,6 @@ func TestSyncer_verifyApp(t *testing.T) { LastBlockAppHash: []byte("app_hash"), AppVersion: appVersion, }, nil, nil}, - "invalid app version": {&abci.ResponseInfo{ - LastBlockHeight: 3, - LastBlockAppHash: []byte("app_hash"), - AppVersion: 2, - }, nil, appVersionMismatchErr}, "invalid height": {&abci.ResponseInfo{ LastBlockHeight: 5, LastBlockAppHash: []byte("app_hash"), @@ -675,7 +669,7 @@ func TestSyncer_verifyApp(t *testing.T) { syncer := newSyncer(*cfg, log.NewNopLogger(), connSnapshot, connQuery, stateProvider, "") connQuery.On("InfoSync", proxy.RequestInfo).Return(tc.response, tc.err) - err := syncer.verifyApp(s, appVersion) + err := syncer.verifyApp(s) unwrapped := errors.Unwrap(err) if unwrapped != nil { err = unwrapped