This commit is contained in:
Jacek Sieka 2024-06-17 09:54:51 +02:00
parent 291a72b219
commit 04eb445f97
No known key found for this signature in database
GPG Key ID: A1B09461ABB656B8
4 changed files with 7 additions and 4 deletions

View File

@ -23,6 +23,8 @@ import
../../constants, ../../constants,
../validate ../validate
export results, call_common
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Private functions # Private functions
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------

View File

@ -33,6 +33,7 @@ export
vmc.getDifficulty, vmc.getDifficulty,
vmc.getGasLimit, vmc.getGasLimit,
vmc.getGasPrice, vmc.getGasPrice,
vmc.addLogEntry,
vmc.getGasRefund, vmc.getGasRefund,
vmc.getOrigin, vmc.getOrigin,
vmc.getStorage, vmc.getStorage,

View File

@ -163,7 +163,7 @@ proc setupEnv(com: CommonRef, signer, ks2: EthAddress, ctx: EthContext): TestEnv
let sender = tx.getSender() let sender = tx.getSender()
let rc = vmState.processTransaction(tx, sender, vmHeader) let rc = vmState.processTransaction(tx, sender, vmHeader)
doAssert(rc.isOk, "Invalid transaction: " & rc.error) doAssert(rc.isOk, "Invalid transaction: " & rc.error)
vmState.receipts[txIndex] = makeReceipt(vmState, tx.txType) vmState.receipts[txIndex] = makeReceipt(vmState, tx.txType, rc.value.logEntries())
com.db.persistReceipts(vmState.receipts) com.db.persistReceipts(vmState.receipts)
let let

View File

@ -250,11 +250,11 @@ proc exec(ctx: var TransContext,
) )
continue continue
let gasUsed = rc.get() let callResult = rc.get()
let rec = vmState.makeReceipt(tx.txType) let rec = vmState.makeReceipt(tx.txType, callResult.logEntries)
vmState.receipts.add rec vmState.receipts.add rec
receipts.add toTxReceipt( receipts.add toTxReceipt(
rec, tx, sender, txIndex, gasUsed rec, tx, sender, txIndex, callResult.gasUsed
) )
includedTx.add tx includedTx.add tx
blobGasUsed += tx.getTotalBlobGas blobGasUsed += tx.getTotalBlobGas