rpc: eth_resend (#684)

* Problem: missing json rpc for eth_resend #675

add unit test

restore

Update server/start.go

thanks~

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

tidy up checkTxFee

change comments

* fix lint

* Apply suggestions from code review

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
This commit is contained in:
Jongwhan Lee
2021-10-20 19:14:39 +00:00
committed by GitHub
co-authored by Federico Kunze Küllmer
parent 40b3b9ae1b
commit f70e4c1253
6 changed files with 65 additions and 5 deletions
+13 -2
View File
@@ -360,7 +360,6 @@ func TestEth_GetStorageAt(t *testing.T) {
}
func TestEth_GetProof(t *testing.T) {
rpcRes := call(t, "eth_sendTransaction", makeEthTxParam())
var hash hexutil.Bytes
@@ -401,7 +400,6 @@ func TestEth_GetCode(t *testing.T) {
}
func TestEth_SendTransaction_Transfer(t *testing.T) {
rpcRes := call(t, "eth_sendTransaction", makeEthTxParam())
var hash hexutil.Bytes
@@ -1027,3 +1025,16 @@ func makeEthTxParam() []map[string]string {
return param
}
func TestEth_EthResend(t *testing.T) {
tx := make(map[string]string)
tx["from"] = "0x" + fmt.Sprintf("%x", from)
tx["to"] = "0x0000000000000000000000000000000012341234"
tx["value"] = "0x16345785d8a0000"
tx["nonce"] = "0x2"
tx["gasLimit"] = "0x5208"
tx["gasPrice"] = "0x55ae82600"
param := []interface{}{tx, "0x1", "0x2"}
_, rpcerror := callWithError("eth_resend", param)
require.Equal(t, "transaction 0x3bf28b46ee1bb3925e50ec6003f899f95913db4b0f579c4e7e887efebf9ecd1b not found", fmt.Sprintf("%s", rpcerror))
}