Skip to content

Commit 718ac31

Browse files
fridrik01Stebalien
authored andcommitted
feat: Integrate InvokeActor(cid) event in message trace
1 parent 52e9e12 commit 718ac31

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

rust/src/fvm/machine.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,7 @@ pub struct TraceMessage {
384384
pub codec: u64,
385385
pub gas_limit: u64,
386386
pub read_only: bool,
387+
pub code_cid: Cid,
387388
}
388389

389390
#[derive(Serialize_tuple, Deserialize_tuple, Debug, PartialEq, Eq, Clone)]
@@ -415,6 +416,7 @@ fn build_lotus_trace(
415416
codec: params.codec,
416417
gas_limit,
417418
read_only,
419+
code_cid: Cid::default(),
418420
},
419421
msg_ret: TraceReturn {
420422
exit_code: ExitCode::OK,
@@ -440,6 +442,9 @@ fn build_lotus_trace(
440442
from, to, method, params, value, gas_limit, read_only, trace_iter,
441443
)?);
442444
}
445+
ExecutionEvent::InvokeActor(cid) => {
446+
new_trace.msg.code_cid = cid;
447+
}
443448
ExecutionEvent::CallReturn(exit_code, return_data) => {
444449
let return_data = return_data.unwrap_or_default();
445450
new_trace.msg_ret = TraceReturn {

0 commit comments

Comments
 (0)