Skip to content

Commit 7ea0d40

Browse files
Reecepbcupscoderabbitai[bot]
andauthoredApr 23, 2024··
docs: add authz reference info in the circuit antehandler (#20146)
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 8e60f3b commit 7ea0d40

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎x/circuit/ante/circuit.go

+4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ func NewCircuitBreakerDecorator(ck CircuitBreaker) CircuitBreakerDecorator {
2424
}
2525
}
2626

27+
// If you copy this as reference and your app has the authz module enabled, you must either:
28+
// - recursively check for nested authz.Exec messages in this function.
29+
// - or error early if a nested authz grant is found.
30+
// The circuit AnteHandler handles this with baseapp's service router: https://github.com/cosmos/cosmos-sdk/issues/18632.
2731
func (cbd CircuitBreakerDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) {
2832
// loop through all the messages and check if the message type is allowed
2933
for _, msg := range tx.GetMsgs() {

0 commit comments

Comments
 (0)
Please sign in to comment.