fix(tracing): extend Parity tracing VmExecutedOperation (#3997)

This commit is contained in:
pistomat
2023-07-31 15:29:29 +02:00
committed by GitHub
parent da3bc64fb4
commit 3118e27d9c
2 changed files with 4 additions and 3 deletions

View File

@@ -330,7 +330,7 @@ impl ParityTraceBuilder {
let maybe_execution = Some(VmExecutedOperation {
used: step.gas_cost,
push: step.new_stack.map(|new_stack| new_stack.into()),
push: step.new_stack.into_iter().map(|new_stack| new_stack.into()).collect(),
mem: maybe_memory,
store: maybe_storage,
});

View File

@@ -308,16 +308,16 @@ pub struct VmExecutedOperation {
/// The total gas used.
pub used: u64,
/// The stack item placed, if any.
pub push: Option<H256>,
pub push: Vec<H256>,
/// If altered, the memory delta.
pub mem: Option<MemoryDelta>,
/// The altered storage value, if any.
pub store: Option<StorageDelta>,
}
/// A diff of some chunk of memory.
#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
/// A diff of some chunk of memory.
pub struct MemoryDelta {
/// Offset into memory the change begins.
pub off: usize,
@@ -325,6 +325,7 @@ pub struct MemoryDelta {
pub data: Bytes,
}
/// A diff of some storage value.
#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct StorageDelta {