fix: avoid broadcasting tx through query (#15044)
This commit is contained in:
parent
407c7572b9
commit
c884e276f2
@ -520,6 +520,10 @@ func (app *BaseApp) Query(req abci.RequestQuery) (res abci.ResponseQuery) {
|
||||
telemetry.IncrCounter(1, "query", req.Path)
|
||||
defer telemetry.MeasureSince(time.Now(), req.Path)
|
||||
|
||||
if req.Path == "/cosmos.tx.v1beta1.Service/BroadcastTx" {
|
||||
return sdkerrors.QueryResult(sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "can't route a broadcast tx message"), app.trace)
|
||||
}
|
||||
|
||||
// handle gRPC routes first rather than calling splitPath because '/' characters
|
||||
// are used as part of gRPC paths
|
||||
if grpcHandler := app.grpcQueryRouter.Route(req.Path); grpcHandler != nil {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user