Skip to content

Commit

Permalink
docs: add authz reference info in the circuit antehandler (backport #…
Browse files Browse the repository at this point in the history
…20146) (#20155)

Co-authored-by: Reece Williams <31943163+Reecepbcups@users.noreply.github.com>
  • Loading branch information
mergify[bot] and Reecepbcups authored Apr 23, 2024
1 parent d4896c2 commit 016389c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions x/circuit/ante/circuit.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ func NewCircuitBreakerDecorator(ck CircuitBreaker) CircuitBreakerDecorator {
}
}

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

0 comments on commit 016389c

Please sign in to comment.