mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-09 19:41:21 +00:00
list_unconfirmed_txs RPC call
This commit is contained in:
parent
8aaa918143
commit
115e57a1d5
@ -30,6 +30,7 @@ func BroadcastTx(tx types.Tx) (*ctypes.ResponseBroadcastTx, error) {
|
|||||||
return &ctypes.ResponseBroadcastTx{ctypes.Receipt{txHash, createsContract, contractAddr}}, nil
|
return &ctypes.ResponseBroadcastTx{ctypes.Receipt{txHash, createsContract, contractAddr}}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
func ListUnconfirmedTxs() (*ctypes.ResponseListUnconfirmedTxs, error) {
|
||||||
curl -H 'content-type: text/plain;' http://127.0.0.1:8888/submit_tx?tx=...
|
txs := mempoolReactor.Mempool.GetProposalTxs()
|
||||||
*/
|
return &ctypes.ResponseListUnconfirmedTxs{txs}, nil
|
||||||
|
}
|
||||||
|
@ -17,6 +17,7 @@ var Routes = map[string]*rpc.RPCFunc{
|
|||||||
"dump_consensus_state": rpc.NewRPCFunc(DumpConsensusState, []string{}),
|
"dump_consensus_state": rpc.NewRPCFunc(DumpConsensusState, []string{}),
|
||||||
"dump_storage": rpc.NewRPCFunc(DumpStorage, []string{"address"}),
|
"dump_storage": rpc.NewRPCFunc(DumpStorage, []string{"address"}),
|
||||||
"broadcast_tx": rpc.NewRPCFunc(BroadcastTx, []string{"tx"}),
|
"broadcast_tx": rpc.NewRPCFunc(BroadcastTx, []string{"tx"}),
|
||||||
|
"list_unconfirmed_txs": rpc.NewRPCFunc(ListUnconfirmedTxs, []string{}),
|
||||||
"list_accounts": rpc.NewRPCFunc(ListAccounts, []string{}),
|
"list_accounts": rpc.NewRPCFunc(ListAccounts, []string{}),
|
||||||
"unsafe/gen_priv_account": rpc.NewRPCFunc(GenPrivAccount, []string{}),
|
"unsafe/gen_priv_account": rpc.NewRPCFunc(GenPrivAccount, []string{}),
|
||||||
"unsafe/sign_tx": rpc.NewRPCFunc(SignTx, []string{"tx", "privAccounts"}),
|
"unsafe/sign_tx": rpc.NewRPCFunc(SignTx, []string{"tx", "privAccounts"}),
|
||||||
|
@ -50,11 +50,14 @@ type ResponseGetBlock struct {
|
|||||||
Block *types.Block
|
Block *types.Block
|
||||||
}
|
}
|
||||||
|
|
||||||
// curl -H 'content-type: text/plain;' http://127.0.0.1:8888/submit_tx?tx=...
|
|
||||||
type ResponseBroadcastTx struct {
|
type ResponseBroadcastTx struct {
|
||||||
Receipt Receipt
|
Receipt Receipt
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ResponseListUnconfirmedTxs struct {
|
||||||
|
Txs []types.Tx
|
||||||
|
}
|
||||||
|
|
||||||
type Receipt struct {
|
type Receipt struct {
|
||||||
TxHash []byte
|
TxHash []byte
|
||||||
CreatesContract uint8
|
CreatesContract uint8
|
||||||
|
Loading…
x
Reference in New Issue
Block a user