From fefe6b28326b27de0acbb0a93b3a8786eed4ad79 Mon Sep 17 00:00:00 2001 From: skosito Date: Fri, 17 May 2024 00:45:04 +0200 Subject: [PATCH] PR comments --- app/ante/ante.go | 1 + app/ante/ante_test.go | 19 +++++++++++++++++++ cmd/zetae2e/local/monitor_priority_txs.go | 2 ++ 3 files changed, 22 insertions(+) diff --git a/app/ante/ante.go b/app/ante/ante.go index 7cbd8adebd..8c4187bd36 100644 --- a/app/ante/ante.go +++ b/app/ante/ante.go @@ -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: diff --git a/app/ante/ante_test.go b/app/ante/ante_test.go index 790930d175..75220e14a7 100644 --- a/app/ante/ante_test.go +++ b/app/ante/ante_test.go @@ -36,6 +36,7 @@ func TestIsSystemTx(t *testing.T) { // *cctxtypes.MsgVoteOnObservedInboundTx, // *cctxtypes.MsgVoteOnObservedOutboundTx, // *cctxtypes.MsgAddToOutTxTracker, + // *cctxtypes.MsgAddToInTxTracker, // *observertypes.MsgVoteBlockHeader, // *observertypes.MsgVoteTSS, // *observertypes.MsgAddBlameVote: @@ -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{ diff --git a/cmd/zetae2e/local/monitor_priority_txs.go b/cmd/zetae2e/local/monitor_priority_txs.go index 4af852edde..458be05eab 100644 --- a/cmd/zetae2e/local/monitor_priority_txs.go +++ b/cmd/zetae2e/local/monitor_priority_txs.go @@ -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 @@ -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\"",