From 2d55bdec92cc38855540fd9c1825db07a7bb8f2b Mon Sep 17 00:00:00 2001 From: tycho garen Date: Thu, 10 Mar 2022 14:52:34 -0500 Subject: [PATCH] move init closer --- internal/consensus/common_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/consensus/common_test.go b/internal/consensus/common_test.go index af0f82e3a..8a2d8c68b 100644 --- a/internal/consensus/common_test.go +++ b/internal/consensus/common_test.go @@ -549,6 +549,7 @@ func makeState(ctx context.Context, t *testing.T, args makeStateArgs) (*State, [ vss := make([]*validatorStub, validators) cs := newState(ctx, t, args.logger, state, privVals[0], app) + cs.updateStateFromStore(ctx) for i := 0; i < validators; i++ { vss[i] = newValidatorStub(privVals[i], int32(i)) @@ -556,8 +557,6 @@ func makeState(ctx context.Context, t *testing.T, args makeStateArgs) (*State, [ // since cs1 starts at 1 incrementHeight(vss[1:]...) - cs.updateStateFromStore(ctx) - return cs, vss }