eip2718: fixes test_rpc.nim

This commit is contained in:
jangko 2021-05-15 15:50:23 +07:00
parent a2f77e8627
commit a2712c5c7a
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
1 changed files with 6 additions and 6 deletions

View File

@ -58,19 +58,19 @@ proc setupEnv(chain: BaseChainDB, signer, ks2: EthAddress, conf: NimbusConfigura
var vmState = newBaseVMState(ac.rootHash, BlockHeader(parentHash: parentHash), chain) var vmState = newBaseVMState(ac.rootHash, BlockHeader(parentHash: parentHash), chain)
let let
unsignedTx1 = UnsignedTx( unsignedTx1 = LegacyUnsignedTx(
nonce : 0, nonce : 0,
gasPrice: 1_100, gasPrice: 1_100,
gasLimit: 70_000, gasLimit: 70_000,
value : 1.u256, value : 1.u256,
contractCreation: false isContractCreation: false
) )
unsignedTx2 = UnsignedTx( unsignedTx2 = LegacyUnsignedTx(
nonce : 0, nonce : 0,
gasPrice: 1_200, gasPrice: 1_200,
gasLimit: 70_000, gasLimit: 70_000,
value : 2.u256, value : 2.u256,
contractCreation: false isContractCreation: false
) )
signedTx1 = signTransaction(unsignedTx1, chain, acc.privateKey) signedTx1 = signTransaction(unsignedTx1, chain, acc.privateKey)
signedTx2 = signTransaction(unsignedTx2, 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: for txIndex, tx in txs:
let sender = tx.getSender() let sender = tx.getSender()
discard processTransaction(tx, sender, vmState, fork) discard processTransaction(tx, sender, vmState, fork)
vmState.receipts[txIndex] = makeReceipt(vmState, fork) vmState.receipts[txIndex] = makeReceipt(vmState, fork, tx.txType)
let let
receiptRoot = chain.persistReceipts(vmState.receipts) receiptRoot = chain.persistReceipts(vmState.receipts)