|
|
@ -25,6 +25,7 @@ var Routes = map[string]*rpc.RPCFunc{ |
|
|
|
"unconfirmed_txs": rpc.NewRPCFunc(UnconfirmedTxsResult, ""), |
|
|
|
"num_unconfirmed_txs": rpc.NewRPCFunc(NumUnconfirmedTxsResult, ""), |
|
|
|
|
|
|
|
"unsafe_flush_mempool": rpc.NewRPCFunc(UnsafeFlushMempool, ""), |
|
|
|
"unsafe_set_config": rpc.NewRPCFunc(UnsafeSetConfigResult, "type,key,value"), |
|
|
|
"unsafe_start_cpu_profiler": rpc.NewRPCFunc(UnsafeStartCPUProfilerResult, "filename"), |
|
|
|
"unsafe_stop_cpu_profiler": rpc.NewRPCFunc(UnsafeStopCPUProfilerResult, ""), |
|
|
@ -151,6 +152,14 @@ func BroadcastTxAsyncResult(tx []byte) (ctypes.TMResult, error) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
func UnsafeFlushMempoolResult() (ctypes.TMResult, error) { |
|
|
|
if r, err := UnsafeFlushMempool(); err != nil { |
|
|
|
return nil, err |
|
|
|
} else { |
|
|
|
return r, nil |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
func UnsafeSetConfigResult(typ, key, value string) (ctypes.TMResult, error) { |
|
|
|
if r, err := UnsafeSetConfig(typ, key, value); err != nil { |
|
|
|
return nil, err |
|
|
|