mirror of
https://github.com/0glabs/0g-chain.git
synced 2025-01-02 11:45:26 +00:00
14 lines
431 B
Go
14 lines
431 B
Go
package circuit-breaker
|
|
|
|
func NewCircuitBreakerProposalHandler(k Keeper) govtypes.Handler {
|
|
return func(ctx sdk.Context, content govtypes.Content) sdk.Error {
|
|
switch c := content.(type) {
|
|
case types.CircuitBreakerProposal:
|
|
return keeper.HandleCircuitBreakerProposal(ctx, k, c)
|
|
|
|
default:
|
|
errMsg := fmt.Sprintf("unrecognized circuit-breaker proposal content type: %T", c)
|
|
return sdk.ErrUnknownRequest(errMsg)
|
|
}
|
|
}
|
|
} |