Skip to content

Commit b3f0056

Browse files
reecepbcupscoderabbitai[bot]
authored andcommitted
docs: add authz reference info in the circuit antehandler (#20146)
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> (cherry picked from commit 7ea0d40)
1 parent d4896c2 commit b3f0056

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)