Skip to content

Commit

Permalink
test: use latest version in process proposal test (celestiaorg#3029)
Browse files Browse the repository at this point in the history
  • Loading branch information
rootulp authored Jan 22, 2024
1 parent 1fd4b34 commit d5a5563
Show file tree
Hide file tree
Showing 2 changed files with 126 additions and 132 deletions.
32 changes: 16 additions & 16 deletions app/test/process_proposal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func TestProcessProposal(t *testing.T) {
name: "valid untouched data",
input: validData(),
mutator: func(d *tmproto.Data) {},
appVersion: v1.Version,
appVersion: appconsts.LatestVersion,
expectedResult: abci.ResponseProcessProposal_ACCEPT,
},
{
Expand All @@ -104,7 +104,7 @@ func TestProcessProposal(t *testing.T) {
mutator: func(d *tmproto.Data) {
d.Txs = d.Txs[1:]
},
appVersion: v1.Version,
appVersion: appconsts.LatestVersion,
expectedResult: abci.ResponseProcessProposal_REJECT,
},
{
Expand All @@ -113,7 +113,7 @@ func TestProcessProposal(t *testing.T) {
mutator: func(d *tmproto.Data) {
d.Txs = append(d.Txs, blobTxs[3])
},
appVersion: v1.Version,
appVersion: appconsts.LatestVersion,
expectedResult: abci.ResponseProcessProposal_REJECT,
},
{
Expand All @@ -130,7 +130,7 @@ func TestProcessProposal(t *testing.T) {
blobTxBytes, _ := blobTx.Marshal()
d.Txs[0] = blobTxBytes
},
appVersion: v1.Version,
appVersion: appconsts.LatestVersion,
expectedResult: abci.ResponseProcessProposal_REJECT,
},
{
Expand All @@ -147,7 +147,7 @@ func TestProcessProposal(t *testing.T) {
blobTxBytes, _ := blobTx.Marshal()
d.Txs[0] = blobTxBytes
},
appVersion: v1.Version,
appVersion: appconsts.LatestVersion,
expectedResult: abci.ResponseProcessProposal_REJECT,
},
{
Expand All @@ -164,7 +164,7 @@ func TestProcessProposal(t *testing.T) {
blobTxBytes, _ := blobTx.Marshal()
d.Txs[0] = blobTxBytes
},
appVersion: v1.Version,
appVersion: appconsts.LatestVersion,
expectedResult: abci.ResponseProcessProposal_REJECT,
},
{
Expand All @@ -181,7 +181,7 @@ func TestProcessProposal(t *testing.T) {
blobTxBytes, _ := blobTx.Marshal()
d.Txs[0] = blobTxBytes
},
appVersion: v1.Version,
appVersion: appconsts.LatestVersion,
expectedResult: abci.ResponseProcessProposal_REJECT,
},
{
Expand All @@ -198,7 +198,7 @@ func TestProcessProposal(t *testing.T) {
blobTxBytes, _ := blobTx.Marshal()
d.Txs[0] = blobTxBytes
},
appVersion: v1.Version,
appVersion: appconsts.LatestVersion,
expectedResult: abci.ResponseProcessProposal_REJECT,
},
{
Expand All @@ -211,7 +211,7 @@ func TestProcessProposal(t *testing.T) {
d.Txs[0] = blobTxBytes
d.Hash = calculateNewDataHash(t, d.Txs)
},
appVersion: v1.Version,
appVersion: appconsts.LatestVersion,
expectedResult: abci.ResponseProcessProposal_REJECT,
},
{
Expand All @@ -229,7 +229,7 @@ func TestProcessProposal(t *testing.T) {
// Erasure code the data to update the data root so this doesn't doesn't fail on an incorrect data root.
d.Hash = calculateNewDataHash(t, d.Txs)
},
appVersion: v1.Version,
appVersion: appconsts.LatestVersion,
expectedResult: abci.ResponseProcessProposal_REJECT,
},
{
Expand All @@ -239,7 +239,7 @@ func TestProcessProposal(t *testing.T) {
// swapping the order will cause the data root to be different
d.Txs[0], d.Txs[1], d.Txs[2] = d.Txs[1], d.Txs[2], d.Txs[0]
},
appVersion: v1.Version,
appVersion: appconsts.LatestVersion,
expectedResult: abci.ResponseProcessProposal_REJECT,
},
{
Expand All @@ -249,7 +249,7 @@ func TestProcessProposal(t *testing.T) {
btx, _ := coretypes.UnmarshalBlobTx(blobTxs[3])
d.Txs = append(d.Txs, btx.Tx)
},
appVersion: v1.Version,
appVersion: appconsts.LatestVersion,
expectedResult: abci.ResponseProcessProposal_REJECT,
},
{
Expand Down Expand Up @@ -281,7 +281,7 @@ func TestProcessProposal(t *testing.T) {
// swap txs at index 2 and 3 (essentially swapping a PFB with a normal tx)
d.Txs[3], d.Txs[2] = d.Txs[2], d.Txs[3]
},
appVersion: v1.Version,
appVersion: appconsts.LatestVersion,
expectedResult: abci.ResponseProcessProposal_REJECT,
},
{
Expand All @@ -291,7 +291,7 @@ func TestProcessProposal(t *testing.T) {
d.Txs = append(d.Txs, badSigBlobTx)
d.Hash = calculateNewDataHash(t, d.Txs)
},
appVersion: v1.Version,
appVersion: appconsts.LatestVersion,
expectedResult: abci.ResponseProcessProposal_REJECT,
},
{
Expand All @@ -301,7 +301,7 @@ func TestProcessProposal(t *testing.T) {
d.Txs = append(d.Txs, blobTxWithInvalidNonce)
d.Hash = calculateNewDataHash(t, d.Txs)
},
appVersion: v1.Version,
appVersion: appconsts.LatestVersion,
expectedResult: abci.ResponseProcessProposal_REJECT,
},
{
Expand All @@ -328,7 +328,7 @@ func TestProcessProposal(t *testing.T) {
// square with a tampered sequence start indicator
d.Hash = dah.Hash()
},
appVersion: v1.Version,
appVersion: appconsts.LatestVersion,
expectedResult: abci.ResponseProcessProposal_REJECT,
},
}
Expand Down
Loading

0 comments on commit d5a5563

Please sign in to comment.