mempool: use checktx sync calls (#7868)

This commit is contained in:
Sam Kleinman
2022-02-18 14:17:45 -05:00
committed by GitHub
parent 165cc29474
commit cc18f87000
13 changed files with 88 additions and 274 deletions
-6
View File
@@ -31,7 +31,6 @@ type AppConnConsensus interface {
type AppConnMempool interface {
Error() error
CheckTxAsync(context.Context, types.RequestCheckTx) (*abciclient.ReqRes, error)
CheckTx(context.Context, types.RequestCheckTx) (*types.ResponseCheckTx, error)
Flush(context.Context) error
@@ -152,11 +151,6 @@ func (app *appConnMempool) Flush(ctx context.Context) error {
return app.appConn.Flush(ctx)
}
func (app *appConnMempool) CheckTxAsync(ctx context.Context, req types.RequestCheckTx) (*abciclient.ReqRes, error) {
defer addTimeSample(app.metrics.MethodTiming.With("method", "check_tx", "type", "async"))()
return app.appConn.CheckTxAsync(ctx, req)
}
func (app *appConnMempool) CheckTx(ctx context.Context, req types.RequestCheckTx) (*types.ResponseCheckTx, error) {
defer addTimeSample(app.metrics.MethodTiming.With("method", "check_tx", "type", "sync"))()
return app.appConn.CheckTx(ctx, req)