Skip to content

Commit

Permalink
Fix typo in rust call for execution steps
Browse files Browse the repository at this point in the history
  • Loading branch information
obasekiosa committed Jul 31, 2024
1 parent ebf301a commit f71f3d2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rpc/simulation.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func (h *Handler) simulateTransactions(id BlockID, transactions []BroadcastedTra
BlockHashToBeRevealed: blockHashToBeRevealed,
}
useBlobData := !v0_6Response
overallFees, dataGasConsumed, traces, numSteps, err := h.vm.Execute(txns, classes, paidFeesOnL1, &blockInfo,
overallFees, dataGasConsumed, traces, _, err := h.vm.Execute(txns, classes, paidFeesOnL1, &blockInfo,
state, h.bcReader.Network(), skipFeeCharge, skipValidate, errOnRevert, useBlobData)
if err != nil {
if errors.Is(err, utils.ErrResourceBusy) {
Expand Down
2 changes: 1 addition & 1 deletion rpc/trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ 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,
overallFees, dataGasConsumed, traces, _, err := h.vm.Execute(block.Transactions, classes, paidFeesOnL1, &blockInfo, state, network, false,
false, false, useBlobData)
if err != nil {
if errors.Is(err, utils.ErrResourceBusy) {
Expand Down
2 changes: 1 addition & 1 deletion vm/rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ 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.n_steps; // todo: n_steps may not be in this object check later
let execution_steps = t.transaction_receipt.resources.vm_resources.n_steps.try_into().unwrap(); // todo: n_steps may not be in this object check later

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

0 comments on commit f71f3d2

Please sign in to comment.