|
@ -178,7 +178,9 @@ func TestStateEnterProposeYesPrivValidator(t *testing.T) { |
|
|
defer cancel() |
|
|
defer cancel() |
|
|
|
|
|
|
|
|
cs, _ := makeState(ctx, t, makeStateArgs{config: config, validators: 1}) |
|
|
cs, _ := makeState(ctx, t, makeStateArgs{config: config, validators: 1}) |
|
|
cs.updateStateFromStore(ctx) |
|
|
|
|
|
|
|
|
if err := cs.updateStateFromStore(ctx); err != nil { |
|
|
|
|
|
t.Fatal(err) |
|
|
|
|
|
} |
|
|
height, round := cs.Height, cs.Round |
|
|
height, round := cs.Height, cs.Round |
|
|
|
|
|
|
|
|
// Listen for propose timeout event
|
|
|
// Listen for propose timeout event
|
|
@ -707,7 +709,9 @@ func TestStateLock_POLUpdateLock(t *testing.T) { |
|
|
|
|
|
|
|
|
// Generate a new proposal block.
|
|
|
// Generate a new proposal block.
|
|
|
cs2 := newState(ctx, t, logger, cs1.state, vs2, kvstore.NewApplication()) |
|
|
cs2 := newState(ctx, t, logger, cs1.state, vs2, kvstore.NewApplication()) |
|
|
cs2.updateStateFromStore(ctx) |
|
|
|
|
|
|
|
|
if err := cs2.updateStateFromStore(ctx); err != nil { |
|
|
|
|
|
t.Fatal(err) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
require.NoError(t, err) |
|
|
require.NoError(t, err) |
|
|
propR1, propBlockR1 := decideProposal(ctx, t, cs2, vs2, vs2.Height, vs2.Round) |
|
|
propR1, propBlockR1 := decideProposal(ctx, t, cs2, vs2, vs2.Height, vs2.Round) |
|
@ -1001,7 +1005,10 @@ func TestStateLock_PrevoteNilWhenLockedAndDifferentProposal(t *testing.T) { |
|
|
incrementRound(vs2, vs3, vs4) |
|
|
incrementRound(vs2, vs3, vs4) |
|
|
round++ |
|
|
round++ |
|
|
cs2 := newState(ctx, t, logger, cs1.state, vs2, kvstore.NewApplication()) |
|
|
cs2 := newState(ctx, t, logger, cs1.state, vs2, kvstore.NewApplication()) |
|
|
cs2.updateStateFromStore(ctx) |
|
|
|
|
|
|
|
|
if err := cs2.updateStateFromStore(ctx); err != nil { |
|
|
|
|
|
t.Fatal(err) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
propR1, propBlockR1 := decideProposal(ctx, t, cs2, vs2, vs2.Height, vs2.Round) |
|
|
propR1, propBlockR1 := decideProposal(ctx, t, cs2, vs2, vs2.Height, vs2.Round) |
|
|
propBlockR1Parts, err := propBlockR1.MakePartSet(types.BlockPartSizeBytes) |
|
|
propBlockR1Parts, err := propBlockR1.MakePartSet(types.BlockPartSizeBytes) |
|
|
require.NoError(t, err) |
|
|
require.NoError(t, err) |
|
@ -1109,7 +1116,10 @@ func TestStateLock_POLDoesNotUnlock(t *testing.T) { |
|
|
round++ |
|
|
round++ |
|
|
incrementRound(vs2, vs3, vs4) |
|
|
incrementRound(vs2, vs3, vs4) |
|
|
cs2 := newState(ctx, t, logger, cs1.state, vs2, kvstore.NewApplication()) |
|
|
cs2 := newState(ctx, t, logger, cs1.state, vs2, kvstore.NewApplication()) |
|
|
cs2.updateStateFromStore(ctx) |
|
|
|
|
|
|
|
|
if err := cs2.updateStateFromStore(ctx); err != nil { |
|
|
|
|
|
t.Fatal(err) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
prop, propBlock := decideProposal(ctx, t, cs2, vs2, vs2.Height, vs2.Round) |
|
|
prop, propBlock := decideProposal(ctx, t, cs2, vs2, vs2.Height, vs2.Round) |
|
|
propBlockParts, err := propBlock.MakePartSet(types.BlockPartSizeBytes) |
|
|
propBlockParts, err := propBlock.MakePartSet(types.BlockPartSizeBytes) |
|
|
require.NoError(t, err) |
|
|
require.NoError(t, err) |
|
|