Files
tendermint/internal/rpc/core/dev.go
M. J. Fromberger 50ac52e28d rpc: replace custom context-like argument with context.Context (#7559)
* Rename rpctypes.Context to CallInfo.

Add methods to attach and recover this value from a context.Context.

* Rework RPC method handlers to accept "real" contexts.

- Replace *rpctypes.Context arguments with context.Context.
- Update usage of RPC context fields to use CallInfo.
2022-01-11 11:47:56 -08:00

14 lines
338 B
Go

package core
import (
"context"
"github.com/tendermint/tendermint/rpc/coretypes"
)
// UnsafeFlushMempool removes all transactions from the mempool.
func (env *Environment) UnsafeFlushMempool(ctx context.Context) (*coretypes.ResultUnsafeFlushMempool, error) {
env.Mempool.Flush()
return &coretypes.ResultUnsafeFlushMempool{}, nil
}