Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,7 @@ pub struct InstrEffects {
pub modified_accounts: Vec<(Pubkey, Account)>,
pub cu_avail: u64,
pub return_data: Vec<u8>,
pub log: Vec<u8>,
}

impl From<InstrEffects> for proto::InstrEffects {
Expand All @@ -509,6 +510,7 @@ impl From<InstrEffects> for proto::InstrEffects {
.collect(),
cu_avail: val.cu_avail,
return_data: val.return_data,
log: val.log,
}
}
}
Expand Down Expand Up @@ -941,6 +943,13 @@ fn execute_instr(mut input: InstrContext) -> Option<InstrEffects> {
.process_instruction(&mut compute_units_consumed, &mut ExecuteTimings::default())
};

let log = invoke_context
.get_log_collector()?
.borrow()
.get_recorded_content()
.join("\n")
.into_bytes();

#[cfg(feature = "core-bpf-conformance")]
// To keep alignment with a builtin run, deduct only the CUs the builtin
// version would have consumed, so the fixture realizes the same CU
Expand Down Expand Up @@ -1073,6 +1082,7 @@ fn execute_instr(mut input: InstrContext) -> Option<InstrEffects> {
.collect(),
cu_avail,
return_data,
log,
})
}

Expand Down
Loading