remove unused vmState param from t8n tool

This commit is contained in:
jangko 2023-05-11 14:36:32 +07:00
parent 4e58f9d79a
commit 2871dbfddf
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
1 changed files with 4 additions and 6 deletions

View File

@ -112,18 +112,17 @@ proc postState(db: AccountsCache, alloc: var GenesisAlloc) =
acc.storage[k] = v
alloc[accAddr] = acc
proc genAddress(vmState: BaseVMState, tx: Transaction, sender: EthAddress): EthAddress =
proc genAddress(tx: Transaction, sender: EthAddress): EthAddress =
if tx.to.isNone:
result = generateAddress(sender, tx.nonce)
proc toTxReceipt(vmState: BaseVMState,
rec: Receipt,
proc toTxReceipt(rec: Receipt,
tx: Transaction,
sender: EthAddress,
txIndex: int,
gasUsed: GasInt): TxReceipt =
let contractAddress = genAddress(vmState, tx, sender)
let contractAddress = genAddress(tx, sender)
TxReceipt(
txType: tx.txType,
root: if rec.isHash: rec.hash else: Hash256(),
@ -237,8 +236,7 @@ proc exec(ctx: var TransContext,
let rec = vmState.makeReceipt(tx.txType)
vmState.receipts.add rec
receipts.add toTxReceipt(
vmState, rec,
tx, sender, txIndex, gasUsed
rec, tx, sender, txIndex, gasUsed
)
includedTx.add tx