From f65bb983a9035cd8d1af2e7b992e5e4c026534eb Mon Sep 17 00:00:00 2001 From: William Banfield Date: Thu, 17 Mar 2022 18:49:42 -0400 Subject: [PATCH] modified status --- internal/state/execution_test.go | 22 +++++++++++----------- test/e2e/app/app.go | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/internal/state/execution_test.go b/internal/state/execution_test.go index e62735a4a..3df5afab7 100644 --- a/internal/state/execution_test.go +++ b/internal/state/execution_test.go @@ -679,8 +679,8 @@ func TestPrepareProposalRemoveTxs(t *testing.T) { app := abcimocks.NewBaseMock() app.On("PrepareProposal", mock.Anything).Return(abci.ResponsePrepareProposal{ - ModifiedTx: true, - TxRecords: trs, + ModifiedTxStatus: abci.ResponsePrepareProposal_MODIFIED, + TxRecords: trs, }, nil) cc := abciclient.NewLocalClient(logger, app) @@ -740,8 +740,8 @@ func TestPrepareProposalAddedTxsIncluded(t *testing.T) { app := abcimocks.NewBaseMock() app.On("PrepareProposal", mock.Anything).Return(abci.ResponsePrepareProposal{ - ModifiedTx: true, - TxRecords: trs, + ModifiedTxStatus: abci.ResponsePrepareProposal_MODIFIED, + TxRecords: trs, }, nil) cc := abciclient.NewLocalClient(logger, app) @@ -798,8 +798,8 @@ func TestPrepareProposalReorderTxs(t *testing.T) { app := abcimocks.NewBaseMock() app.On("PrepareProposal", mock.Anything).Return(abci.ResponsePrepareProposal{ - ModifiedTx: true, - TxRecords: trs, + ModifiedTxStatus: abci.ResponsePrepareProposal_MODIFIED, + TxRecords: trs, }, nil) cc := abciclient.NewLocalClient(logger, app) @@ -828,10 +828,10 @@ func TestPrepareProposalReorderTxs(t *testing.T) { } -// TestPrepareProposalModifiedTxFalse tests that CreateBlock correctly ignores +// TestPrepareProposalModifiedTxStatusFalse tests that CreateBlock correctly ignores // the ResponsePrepareProposal TxRecords if ResponsePrepareProposal does not -// set ModifiedTx to true. -func TestPrepareProposalModifiedTxFalse(t *testing.T) { +// set ModifiedTxStatus to true. +func TestPrepareProposalModifiedTxStatusFalse(t *testing.T) { const height = 2 ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -861,8 +861,8 @@ func TestPrepareProposalModifiedTxFalse(t *testing.T) { app := abcimocks.NewBaseMock() app.On("PrepareProposal", mock.Anything).Return(abci.ResponsePrepareProposal{ - ModifiedTx: false, - TxRecords: trs, + ModifiedTxStatus: abci.ResponsePrepareProposal_UNMODIFIED, + TxRecords: trs, }, nil) cc := abciclient.NewLocalClient(logger, app) diff --git a/test/e2e/app/app.go b/test/e2e/app/app.go index 5739f06e5..4b5a88821 100644 --- a/test/e2e/app/app.go +++ b/test/e2e/app/app.go @@ -306,7 +306,7 @@ func (app *Application) ApplySnapshotChunk(req abci.RequestApplySnapshotChunk) a func (app *Application) PrepareProposal(req abci.RequestPrepareProposal) abci.ResponsePrepareProposal { // None of the transactions are modified by this application. - return abci.ResponsePrepareProposal{ModifiedTx: false} + return abci.ResponsePrepareProposal{ModifiedTxStatus: abci.ResponsePrepareProposal_UNMODIFIED} } // ProcessProposal implements part of the Application interface.