Skip to content

Commit 016389c

Browse files
docs: add authz reference info in the circuit antehandler (backport #20146) (#20155)
Co-authored-by: Reece Williams <31943163+Reecepbcups@users.noreply.github.com>
1 parent d4896c2 commit 016389c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

x/circuit/ante/circuit.go

Lines changed: 4 additions & 0 deletions
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)