Skip to content

Commit 619662c

Browse files
authored
Add state_root_time_us field to MeterBundleResponse (#148)
The builder returns state_root_time_us in its response but tips was silently dropping this field during deserialization. Add the field with serde(default) for backwards compatibility.
1 parent ba25fd0 commit 619662c

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

crates/core/src/test_utils.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,5 +75,6 @@ pub fn create_test_meter_bundle_response() -> MeterBundleResponse {
7575
state_flashblock_index: None,
7676
total_gas_used: 0,
7777
total_execution_time_us: 0,
78+
state_root_time_us: 0,
7879
}
7980
}

crates/core/src/types.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,8 @@ pub struct MeterBundleResponse {
298298
pub state_flashblock_index: Option<u64>,
299299
pub total_gas_used: u64,
300300
pub total_execution_time_us: u128,
301+
#[serde(default)]
302+
pub state_root_time_us: u128,
301303
}
302304

303305
#[cfg(test)]

0 commit comments

Comments
 (0)