|
@ -22,6 +22,7 @@ var Routes = map[string]*rpc.RPCFunc{ |
|
|
"broadcast_tx_sync": rpc.NewRPCFunc(BroadcastTxSyncResult, "tx"), |
|
|
"broadcast_tx_sync": rpc.NewRPCFunc(BroadcastTxSyncResult, "tx"), |
|
|
"broadcast_tx_async": rpc.NewRPCFunc(BroadcastTxAsyncResult, "tx"), |
|
|
"broadcast_tx_async": rpc.NewRPCFunc(BroadcastTxAsyncResult, "tx"), |
|
|
"unconfirmed_txs": rpc.NewRPCFunc(UnconfirmedTxsResult, ""), |
|
|
"unconfirmed_txs": rpc.NewRPCFunc(UnconfirmedTxsResult, ""), |
|
|
|
|
|
"num_unconfirmed_txs": rpc.NewRPCFunc(NumUnconfirmedTxsResult, ""), |
|
|
|
|
|
|
|
|
"unsafe_set_config": rpc.NewRPCFunc(UnsafeSetConfigResult, "type,key,value"), |
|
|
"unsafe_set_config": rpc.NewRPCFunc(UnsafeSetConfigResult, "type,key,value"), |
|
|
} |
|
|
} |
|
@ -114,6 +115,14 @@ func UnconfirmedTxsResult() (ctypes.TMResult, error) { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func NumUnconfirmedTxsResult() (ctypes.TMResult, error) { |
|
|
|
|
|
if r, err := NumUnconfirmedTxs(); err != nil { |
|
|
|
|
|
return nil, err |
|
|
|
|
|
} else { |
|
|
|
|
|
return r, nil |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
func BroadcastTxSyncResult(tx []byte) (ctypes.TMResult, error) { |
|
|
func BroadcastTxSyncResult(tx []byte) (ctypes.TMResult, error) { |
|
|
if r, err := BroadcastTxSync(tx); err != nil { |
|
|
if r, err := BroadcastTxSync(tx); err != nil { |
|
|
return nil, err |
|
|
return nil, err |
|
|