From a2712c5c7a622dcdafecac517578d42f9b2001fd Mon Sep 17 00:00:00 2001 From: jangko Date: Sat, 15 May 2021 15:50:23 +0700 Subject: [PATCH] eip2718: fixes test_rpc.nim --- tests/test_rpc.nim | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/test_rpc.nim b/tests/test_rpc.nim index ed8d6d4bf..bd859cf49 100644 --- a/tests/test_rpc.nim +++ b/tests/test_rpc.nim @@ -58,19 +58,19 @@ proc setupEnv(chain: BaseChainDB, signer, ks2: EthAddress, conf: NimbusConfigura var vmState = newBaseVMState(ac.rootHash, BlockHeader(parentHash: parentHash), chain) let - unsignedTx1 = UnsignedTx( + unsignedTx1 = LegacyUnsignedTx( nonce : 0, gasPrice: 1_100, gasLimit: 70_000, value : 1.u256, - contractCreation: false + isContractCreation: false ) - unsignedTx2 = UnsignedTx( + unsignedTx2 = LegacyUnsignedTx( nonce : 0, gasPrice: 1_200, gasLimit: 70_000, value : 2.u256, - contractCreation: false + isContractCreation: false ) signedTx1 = signTransaction(unsignedTx1, chain, acc.privateKey) signedTx2 = signTransaction(unsignedTx2, chain, acc.privateKey) @@ -82,7 +82,7 @@ proc setupEnv(chain: BaseChainDB, signer, ks2: EthAddress, conf: NimbusConfigura for txIndex, tx in txs: let sender = tx.getSender() discard processTransaction(tx, sender, vmState, fork) - vmState.receipts[txIndex] = makeReceipt(vmState, fork) + vmState.receipts[txIndex] = makeReceipt(vmState, fork, tx.txType) let receiptRoot = chain.persistReceipts(vmState.receipts) @@ -381,7 +381,7 @@ proc doTests {.async.} = let res2 = await client.eth_getTransactionReceipt(env.blockHash) check res2.isNone - + test "eth_getUncleByBlockHashAndIndex": let res = await client.eth_getUncleByBlockHashAndIndex(env.blockHash, encodeQuantity(0)) check res.isSome