diff --git a/Code/itf/src/driver.rs b/Code/itf/src/driver.rs index 99ce4faf2..9fd45515c 100644 --- a/Code/itf/src/driver.rs +++ b/Code/itf/src/driver.rs @@ -11,6 +11,16 @@ use crate::{Address, Height, Proposal, Round, Timeout, Value, Vote, Weight}; pub struct State { #[serde(rename = "line28Test::N4F1::system")] pub system: HashMap
, + + #[serde(rename = "line28Test::N4F1::_hist")] + pub history: HistoryEntry, +} + +#[derive(Clone, Debug, PartialEq, Eq, Deserialize)] +pub struct HistoryEntry { + pub validator: Address, + pub input: DriverInput, + pub output: ConsensusOutput, } #[derive(Clone, Debug, PartialEq, Eq, Deserialize)] @@ -52,3 +62,27 @@ pub struct DriverState { #[serde(rename = "nextValueToPropose")] pub next_value_to_propose: Value, } + +#[derive(Clone, Debug, PartialEq, Eq, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct DriverInput { + pub name: String, + pub proposal: Proposal, + pub vote: Vote, + pub timeout: Timeout, + pub cs_input: ConsensusInput, + pub next_value_to_propose: Value, +} + +#[derive(Clone, Debug, PartialEq, Eq, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct ConsensusOutput { + pub name: String, + pub proposal: Proposal, + #[serde(rename = "voteMessage")] + pub vote: Vote, + pub timeout: Timeout, + pub decided: Value, + #[serde(with = "As::