Skip to content

Commit

Permalink
PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
skosito committed May 16, 2024
1 parent 4cd3cf9 commit fefe6b2
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/ante/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ func IsSystemTx(tx sdk.Tx, isAuthorizedSigner func(string) bool) bool {
*crosschaintypes.MsgVoteOnObservedInboundTx,
*crosschaintypes.MsgVoteOnObservedOutboundTx,
*crosschaintypes.MsgAddToOutTxTracker,
*crosschaintypes.MsgAddToInTxTracker,
*observertypes.MsgVoteBlockHeader,
*observertypes.MsgVoteTSS,
*observertypes.MsgAddBlameVote:
Expand Down
19 changes: 19 additions & 0 deletions app/ante/ante_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ func TestIsSystemTx(t *testing.T) {
// *cctxtypes.MsgVoteOnObservedInboundTx,
// *cctxtypes.MsgVoteOnObservedOutboundTx,
// *cctxtypes.MsgAddToOutTxTracker,
// *cctxtypes.MsgAddToInTxTracker,
// *observertypes.MsgVoteBlockHeader,
// *observertypes.MsgVoteTSS,
// *observertypes.MsgAddBlameVote:
Expand Down Expand Up @@ -168,6 +169,24 @@ func TestIsSystemTx(t *testing.T) {

true,
},
{
"MsgAddToInTxTracker",
buildTxFromMsg(&crosschaintypes.MsgAddToInTxTracker{
Creator: sample.AccAddress(),
}),
isAuthorized,

true,
},
{
"MsgExec{MsgAddToInTxTracker}",
buildAuthzTxFromMsg(&crosschaintypes.MsgAddToInTxTracker{
Creator: sample.AccAddress(),
}),
isAuthorized,

true,
},
{
"MsgVoteTSS",
buildTxFromMsg(&observertypes.MsgVoteTSS{
Expand Down
2 changes: 2 additions & 0 deletions cmd/zetae2e/local/monitor_priority_txs.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ func processTx(txResult *coretypes.ResultTx, nonSystemTxFound *bool, errCh chan
// a non system tx has been found in the block before a system tx
if *nonSystemTxFound {
errCh <- errors.New("wrong tx priority, system tx not on top")
return
}
} else {
*nonSystemTxFound = true
Expand All @@ -92,6 +93,7 @@ func isMsgTypeURLSystemTx(attr types.EventAttribute) bool {
"\"/zetachain.zetacore.crosschain.MsgVoteOnObservedInboundTx\"",
"\"/zetachain.zetacore.crosschain.MsgVoteGasPrice\"",
"\"/zetachain.zetacore.crosschain.MsgAddToOutTxTracker\"",
"\"/zetachain.zetacore.crosschain.MsgAddToInTxTracker\"",
"\"/zetachain.zetacore.observer.MsgVoteBlockHeader\"",
"\"/zetachain.zetacore.observer.MsgVoteTSS\"",
"\"/zetachain.zetacore.observer.MsgAddBlameVote\"",
Expand Down

0 comments on commit fefe6b2

Please sign in to comment.