|
@ -646,7 +646,7 @@ func TestEmptyPrepareProposal(t *testing.T) { |
|
|
) |
|
|
) |
|
|
pa, _ := state.Validators.GetByIndex(0) |
|
|
pa, _ := state.Validators.GetByIndex(0) |
|
|
commit := makeValidCommit(ctx, t, height, types.BlockID{}, state.Validators, privVals) |
|
|
commit := makeValidCommit(ctx, t, height, types.BlockID{}, state.Validators, privVals) |
|
|
_, err = blockExec.CreateProposalBlock(ctx, height, state, commit, pa) |
|
|
|
|
|
|
|
|
_, err = blockExec.CreateProposalBlock(ctx, height, state, commit, pa, nil) |
|
|
require.NoError(t, err) |
|
|
require.NoError(t, err) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -699,7 +699,7 @@ func TestPrepareProposalRemoveTxs(t *testing.T) { |
|
|
) |
|
|
) |
|
|
pa, _ := state.Validators.GetByIndex(0) |
|
|
pa, _ := state.Validators.GetByIndex(0) |
|
|
commit := makeValidCommit(ctx, t, height, types.BlockID{}, state.Validators, privVals) |
|
|
commit := makeValidCommit(ctx, t, height, types.BlockID{}, state.Validators, privVals) |
|
|
block, err := blockExec.CreateProposalBlock(ctx, height, state, commit, pa) |
|
|
|
|
|
|
|
|
block, err := blockExec.CreateProposalBlock(ctx, height, state, commit, pa, nil) |
|
|
require.NoError(t, err) |
|
|
require.NoError(t, err) |
|
|
require.Len(t, block.Data.Txs.ToSliceOfBytes(), len(trs)-2) |
|
|
require.Len(t, block.Data.Txs.ToSliceOfBytes(), len(trs)-2) |
|
|
|
|
|
|
|
@ -760,7 +760,7 @@ func TestPrepareProposalAddedTxsIncluded(t *testing.T) { |
|
|
) |
|
|
) |
|
|
pa, _ := state.Validators.GetByIndex(0) |
|
|
pa, _ := state.Validators.GetByIndex(0) |
|
|
commit := makeValidCommit(ctx, t, height, types.BlockID{}, state.Validators, privVals) |
|
|
commit := makeValidCommit(ctx, t, height, types.BlockID{}, state.Validators, privVals) |
|
|
block, err := blockExec.CreateProposalBlock(ctx, height, state, commit, pa) |
|
|
|
|
|
|
|
|
block, err := blockExec.CreateProposalBlock(ctx, height, state, commit, pa, nil) |
|
|
require.NoError(t, err) |
|
|
require.NoError(t, err) |
|
|
|
|
|
|
|
|
require.Equal(t, txs[0], block.Data.Txs[0]) |
|
|
require.Equal(t, txs[0], block.Data.Txs[0]) |
|
@ -818,7 +818,7 @@ func TestPrepareProposalReorderTxs(t *testing.T) { |
|
|
) |
|
|
) |
|
|
pa, _ := state.Validators.GetByIndex(0) |
|
|
pa, _ := state.Validators.GetByIndex(0) |
|
|
commit := makeValidCommit(ctx, t, height, types.BlockID{}, state.Validators, privVals) |
|
|
commit := makeValidCommit(ctx, t, height, types.BlockID{}, state.Validators, privVals) |
|
|
block, err := blockExec.CreateProposalBlock(ctx, height, state, commit, pa) |
|
|
|
|
|
|
|
|
block, err := blockExec.CreateProposalBlock(ctx, height, state, commit, pa, nil) |
|
|
require.NoError(t, err) |
|
|
require.NoError(t, err) |
|
|
for i, tx := range block.Data.Txs { |
|
|
for i, tx := range block.Data.Txs { |
|
|
require.Equal(t, types.Tx(trs[i].Tx), tx) |
|
|
require.Equal(t, types.Tx(trs[i].Tx), tx) |
|
@ -881,7 +881,7 @@ func TestPrepareProposalModifiedTxFalse(t *testing.T) { |
|
|
) |
|
|
) |
|
|
pa, _ := state.Validators.GetByIndex(0) |
|
|
pa, _ := state.Validators.GetByIndex(0) |
|
|
commit := makeValidCommit(ctx, t, height, types.BlockID{}, state.Validators, privVals) |
|
|
commit := makeValidCommit(ctx, t, height, types.BlockID{}, state.Validators, privVals) |
|
|
block, err := blockExec.CreateProposalBlock(ctx, height, state, commit, pa) |
|
|
|
|
|
|
|
|
block, err := blockExec.CreateProposalBlock(ctx, height, state, commit, pa, nil) |
|
|
require.NoError(t, err) |
|
|
require.NoError(t, err) |
|
|
for i, tx := range block.Data.Txs { |
|
|
for i, tx := range block.Data.Txs { |
|
|
require.Equal(t, txs[i], tx) |
|
|
require.Equal(t, txs[i], tx) |
|
|