celestiaorg / celestia-app

PoS application for the consensus portion of the Celestia network. Built using celestia-core (fork of CometBFT) and the cosmos-sdk
https://celestia.org
Apache License 2.0
328 stars 261 forks source link

`IsAllowed` doesn't appear used #3593

Closed rootulp closed 1 week ago

rootulp commented 1 week ago

Context

https://github.com/celestiaorg/celestia-app/blob/85eb1cb707448b29dd821b7a0f72fd652f6ce473/app/ante/msg_gatekeeper.go#L67-L78

Problem

IsAllowed doesn't appear used outside a unit test.

cc: @cmwaters any idea why it was added in https://github.com/celestiaorg/celestia-app/pull/3162/files ? It doesn't appear used outside the test file in that PR.

Proposal

Delete IsAllowed if it's not used or necessary

rootulp commented 1 week ago

Oh it's needed to satisfy this interface:

// CircuitBreaker is an interface that defines the methods for a circuit breaker.
type CircuitBreaker interface {
    IsAllowed(ctx context.Context, typeURL string) (bool, error)
}