Skip to content

Commit

Permalink
Fix: lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
obasekiosa committed Aug 7, 2024
1 parent 62e82af commit 3770005
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion rpc/estimate_fee.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ type estimateFeeHandler func(broadcastedTxns []BroadcastedTransaction,
simulationFlags []SimulationFlag, id BlockID,
) ([]FeeEstimate, http.Header, *jsonrpc.Error)

func (h *Handler) estimateMessageFee(msg MsgFromL1, id BlockID, f estimateFeeHandler) (*FeeEstimate, http.Header, *jsonrpc.Error) { //nolint:gocritic
func (h *Handler) estimateMessageFee(msg MsgFromL1, id BlockID, f estimateFeeHandler) (*FeeEstimate,

Check failure on line 113 in rpc/estimate_fee.go

View workflow job for this annotation

GitHub Actions / lint

hugeParam: msg is heavy (112 bytes); consider passing it by pointer (gocritic)
http.Header, *jsonrpc.Error) { //nolint:gocritic

Check warning on line 114 in rpc/estimate_fee.go

View check run for this annotation

Codecov / codecov/patch

rpc/estimate_fee.go#L114

Added line #L114 was not covered by tests
calldata := make([]*felt.Felt, 0, len(msg.Payload)+1)
// The order of the calldata parameters matters. msg.From must be prepended.
calldata = append(calldata, new(felt.Felt).SetBytes(msg.From.Bytes()))
Expand Down
8 changes: 4 additions & 4 deletions rpc/trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ func (h *Handler) TraceTransactionV0_6(ctx context.Context, hash felt.Felt) (*vm
return h.traceTransaction(ctx, &hash, true)
}

func (h *Handler) traceTransaction(ctx context.Context, hash *felt.Felt, v0_6Response bool) (*vm.TransactionTrace, http.Header, *jsonrpc.Error) {
func (h *Handler) traceTransaction(ctx context.Context, hash *felt.Felt, v0_6Response bool) (*vm.TransactionTrace,
http.Header, *jsonrpc.Error) {
_, blockHash, _, err := h.bcReader.Receipt(hash)
httpHeader := http.Header{}
httpHeader.Set(ExecutionStepsHeader, "0")
Expand Down Expand Up @@ -205,7 +206,6 @@ func (h *Handler) TraceBlockTransactionsV0_6(ctx context.Context, id BlockID) ([

func (h *Handler) traceBlockTransactions(ctx context.Context, block *core.Block, v0_6Response bool, //nolint: gocyclo, funlen
) ([]TracedBlockTransaction, http.Header, *jsonrpc.Error) {

execStepsHeader := http.Header{}
execStepsHeader.Set(ExecutionStepsHeader, "0")

Expand Down Expand Up @@ -276,8 +276,8 @@ func (h *Handler) traceBlockTransactions(ctx context.Context, block *core.Block,
}

useBlobData := !v0_6Response
overallFees, dataGasConsumed, traces, numSteps, err := h.vm.Execute(block.Transactions, classes, paidFeesOnL1, &blockInfo, state, network, false,
false, false, useBlobData)
overallFees, dataGasConsumed, traces, numSteps, err := h.vm.Execute(block.Transactions, classes, paidFeesOnL1,
&blockInfo, state, network, false, false, false, useBlobData)

execStepsHeader.Set(ExecutionStepsHeader, strconv.FormatUint(numSteps, 10))

Expand Down

0 comments on commit 3770005

Please sign in to comment.