Add simple test for eth_estimateGas

This commit is contained in:
coffeepots 2018-12-03 20:06:00 +00:00 committed by Ștefan Talpalaru
parent 2c1c3d6c76
commit d19a7f7c04
No known key found for this signature in database
GPG Key ID: CBF7934204F1B6F9
1 changed files with 6 additions and 0 deletions

View File

@ -87,6 +87,12 @@ proc doTests =
let blockNum = state.blockheader.blockNumber
var r = waitFor client.eth_getBalance(address.toEthAddressStr, "0x" & blockNum.toHex)
echo r
test "eth_estimateGas":
let
call = EthCall()
blockNum = state.blockheader.blockNumber
var r = waitFor client.eth_estimateGas(call, "0x" & blockNum.toHex)
check r == 21_000
rpcServer.stop()
rpcServer.close()