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