Skip to content

Commit

Permalink
Fix linter error
Browse files Browse the repository at this point in the history
  • Loading branch information
obasekiosa committed Aug 16, 2024
1 parent 2bba179 commit 585c09f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion jsonrpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ type connection struct {
w io.Writer
activated <-chan struct{}

//todo: guard for this in the code! don't depend on devs finding out about this!
// todo: guard for this in the code! don't depend on devs finding out about this!
// initialErr is not thread-safe. It must be set to its final value before the connection is activated.
initialErr error
}
Expand Down
4 changes: 3 additions & 1 deletion rpc/estimate_fee.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,10 @@ type estimateFeeHandler func(broadcastedTxns []BroadcastedTransaction,
simulationFlags []SimulationFlag, id BlockID,
) ([]FeeEstimate, http.Header, *jsonrpc.Error)

//nolint:gocritic
func (h *Handler) estimateMessageFee(msg MsgFromL1, id BlockID, f estimateFeeHandler) (*FeeEstimate,
http.Header, *jsonrpc.Error) { //nolint:gocritic
http.Header, *jsonrpc.Error,
) {
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
3 changes: 2 additions & 1 deletion rpc/trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ func (h *Handler) TraceTransactionV0_6(ctx context.Context, hash felt.Felt) (*vm
}

func (h *Handler) traceTransaction(ctx context.Context, hash *felt.Felt, v0_6Response bool) (*vm.TransactionTrace,
http.Header, *jsonrpc.Error) {
http.Header, *jsonrpc.Error,
) {
_, blockHash, _, err := h.bcReader.Receipt(hash)
httpHeader := http.Header{}
httpHeader.Set(ExecutionStepsHeader, "0")
Expand Down
8 changes: 7 additions & 1 deletion vm/rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,13 @@ pub extern "C" fn cairoVMExecute(

let actual_fee = t.transaction_receipt.fee.0.into();
let data_gas_consumed = t.transaction_receipt.da_gas.l1_data_gas.into();
let execution_steps = t.transaction_receipt.resources.vm_resources.n_steps.try_into().unwrap_or(u64::MAX);
let execution_steps = t
.transaction_receipt
.resources
.vm_resources
.n_steps
.try_into()
.unwrap_or(u64::MAX);

let trace =
jsonrpc::new_transaction_trace(&txn_and_query_bit.txn, t, &mut txn_state);
Expand Down

0 comments on commit 585c09f

Please sign in to comment.