Skip to content

Commit

Permalink
fix broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cmwaters committed Jun 22, 2023
1 parent 8277961 commit a51cfd3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 25 deletions.
2 changes: 1 addition & 1 deletion app/test/prepare_proposal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func TestPrepareProposalPutsPFBsAtEnd(t *testing.T) {
1000,
accnts[0],
accnts[numBlobTxs:],
"",
testutil.ChainID,
)
txs := append(blobTxs, coretypes.Txs(normalTxs).ToSliceOfBytes()...)

Expand Down
6 changes: 3 additions & 3 deletions app/test/process_proposal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func TestProcessProposal(t *testing.T) {
// create 3 MsgSend transactions that are signed with valid account numbers
// and sequences
sendTxs := testutil.SendTxsWithAccounts(
t, testApp, enc, kr, 1000, accounts[0], accounts[len(accounts)-3:], "",
t, testApp, enc, kr, 1000, accounts[0], accounts[len(accounts)-3:], testutil.ChainID,
)

// block with all blobs included
Expand All @@ -65,11 +65,11 @@ func TestProcessProposal(t *testing.T) {
// create an invalid block by adding an otherwise valid PFB, but an invalid
// signature since there's no account
badSigBlobTx := testutil.RandBlobTxsWithManualSequence(
t, enc, kr, 1000, 1, false, "", accounts[:1], 1, 1, true,
t, enc, kr, 1000, 1, false, testutil.ChainID, accounts[:1], 1, 1, true,
)[0]

blobTxWithInvalidNonce := testutil.RandBlobTxsWithManualSequence(
t, enc, kr, 1000, 1, false, "", accounts[:1], 1, 3, false,
t, enc, kr, 1000, 1, false, testutil.ChainID, accounts[:1], 1, 3, false,
)[0]

ns1 := appns.MustNewV0(bytes.Repeat([]byte{1}, appns.NamespaceVersionZeroIDSize))
Expand Down
21 changes: 0 additions & 21 deletions app/validate_txs.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ package app
import (
"github.com/cosmos/cosmos-sdk/client"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth/ante"
authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper"
core "github.com/tendermint/tendermint/proto/tendermint/types"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
coretypes "github.com/tendermint/tendermint/types"
Expand Down Expand Up @@ -97,22 +95,3 @@ func encodeBlobTxs(blobTxs []tmproto.BlobTx) [][]byte {
}
return txs
}

// sigVerifyAnteHandler creates an AnteHandler with the SetupContext, SetPubKey,
// SigVerification, and IncremementSequence ante decorators to check that
// sequences have be incremented.
func sigVerifyAnteHandler(accKeeper *authkeeper.AccountKeeper, txConfig client.TxConfig) sdk.AnteHandler {
setupd := ante.NewSetUpContextDecorator()
setPubKd := ante.NewSetPubKeyDecorator(accKeeper)
svd := ante.NewSigVerificationDecorator(accKeeper, txConfig.SignModeHandler())
isd := ante.NewIncrementSequenceDecorator(accKeeper)
return sdk.ChainAnteDecorators(setupd, setPubKd, svd, isd)
}

// incrementSequenceAnteHandler creates an AnteHandler that only incrememts the
// sequence.
func incrementSequenceAnteHandler(accKeeper *authkeeper.AccountKeeper) sdk.AnteHandler {
setupd := ante.NewSetUpContextDecorator()
isd := ante.NewIncrementSequenceDecorator(accKeeper)
return sdk.ChainAnteDecorators(setupd, isd)
}

0 comments on commit a51cfd3

Please sign in to comment.