forked from cerc-io/laconicd-deprecated
rpc: implement eth_getPendingTransactions (#259)
* Implement `eth_getPendingTransactions` Closes #244 * refactor repeatitive code * Update ethereum/rpc/namespaces/eth/api.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Update ethereum/rpc/namespaces/eth/api.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Update ethereum/rpc/namespaces/eth/api.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Update ethereum/rpc/namespaces/eth/api.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * test UnwrapEthereumMsg Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
This commit is contained in:
co-authored by
Federico Kunze Küllmer
parent
8d51a70d6d
commit
1a48e09e78
@@ -282,6 +282,12 @@ func TestEth_Pending_GetTransactionByHash(t *testing.T) {
|
||||
err = json.Unmarshal(rpcRes.Result, &pendingBlockTx)
|
||||
require.NoError(t, err)
|
||||
|
||||
txsRes := Call(t, "eth_getPendingTransactions", []interface{}{})
|
||||
var pendingTxs []map[string]interface{}
|
||||
err = json.Unmarshal(txsRes.Result, &pendingTxs)
|
||||
require.NoError(t, err)
|
||||
require.NotEmpty(t, pendingTxs)
|
||||
|
||||
// verify the pending tx has all the correct fields from the tx sent.
|
||||
require.NotEmpty(t, pendingBlockTx)
|
||||
require.NotEmpty(t, pendingBlockTx["hash"])
|
||||
|
||||
Reference in New Issue
Block a user