Add some stub tests for getting block transaction counts and getCode

This commit is contained in:
coffeepots 2018-12-07 18:22:54 +00:00
parent 8a8c4d7c3f
commit f6d94d47ad
1 changed files with 15 additions and 1 deletions

View File

@ -6,7 +6,7 @@ import
../nimbus/nimbus/[vm_state, config],
../nimbus/db/[state_db, db_chain], eth_common, byteutils,
../nimbus/p2p/chain,
../nimbus/genesis,
../nimbus/genesis, ../nimbus/utils/header,
eth_trie/db,
eth_p2p, eth_keys,
rpcclient/[test_hexstrings, rpctesting]
@ -105,6 +105,20 @@ proc doTests =
currentBlockNumberStr()
expected: 0
rpcTest(eth_getBlockTransactionCountByHash):
params: "0x" & chain.getCanonicalHead.hash.data.toHex
expected: 0
rpcTest(eth_getBlockTransactionCountByNumber):
params: currentBlockNumberStr()
expected: 0
rpcTest(eth_getCode):
params:
addressHexStr
currentBlockNumberStr()
expected: "0x0"
rpcServer.stop()
rpcServer.close()