From 21fcc32f93b04e47047a8e80bf53c791d312da88 Mon Sep 17 00:00:00 2001 From: rian Date: Mon, 23 Sep 2024 18:07:25 +0300 Subject: [PATCH] lint --- adapters/vm2core/vm2core.go | 2 +- builder/builder.go | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/adapters/vm2core/vm2core.go b/adapters/vm2core/vm2core.go index f9cc98c137..585e17fdec 100644 --- a/adapters/vm2core/vm2core.go +++ b/adapters/vm2core/vm2core.go @@ -162,7 +162,7 @@ func StateDiff(trace *vm.TransactionTrace) *core.StateDiff { func Receipt(fee *felt.Felt, feeUnit core.FeeUnit, txHash *felt.Felt, trace *vm.TransactionTrace, txnReceipt *vm.TransactionReceipt, ) *core.TransactionReceipt { - return &core.TransactionReceipt{ + return &core.TransactionReceipt{ //nolint:exhaustruct Fee: fee, FeeUnit: feeUnit, Events: AdaptOrderedEvents(trace.AllEvents()), diff --git a/builder/builder.go b/builder/builder.go index e0f3a9d20f..50b4e71de1 100644 --- a/builder/builder.go +++ b/builder/builder.go @@ -489,10 +489,7 @@ func (b *Builder) runTxn(txn *mempool.BroadcastedTransaction) error { receipt := vm2core.Receipt(fee[0], feeUnit, txn.Transaction.Hash(), &trace[0], &txnReceipts[0]) if b.shadowBlock != nil { - err = b.overrideTraces(receipt) - if err != nil { - return err - } + b.overrideTraces(receipt) } if b.junoEndpoint != "" { seqTrace := vm2core.AdaptStateDiff(trace[0].StateDiff) @@ -545,12 +542,11 @@ func mergeStateDiffs(oldStateDiff, newStateDiff *core.StateDiff) *core.StateDiff return oldStateDiff } -func (b *Builder) overrideTraces(receipt *core.TransactionReceipt) error { +func (b *Builder) overrideTraces(receipt *core.TransactionReceipt) { // Note: the error message changes between blockifier-rc2 and blockifier-rc3. // If we run with blockifier-rc3, we won't get the same revert-reason that was // generated if the FGW was running blockifier-rc2. We account for this here. receipt.RevertReason = b.shadowBlock.Receipts[b.pendingBlock.Block.TransactionCount].RevertReason - return nil } // shadowTxns pulls transactions from the FGW and feeds them into the mempool for execution.