Skip to content

Commit

Permalink
Describe the state and its methods
Browse files Browse the repository at this point in the history
  • Loading branch information
romac committed Dec 18, 2024
1 parent 8a578ac commit 5282152
Show file tree
Hide file tree
Showing 3 changed files with 352 additions and 44 deletions.
2 changes: 0 additions & 2 deletions code/examples/channel/src/app.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use std::time::Duration;

use eyre::eyre;
use tracing::{error, info};

Expand Down
6 changes: 4 additions & 2 deletions code/examples/channel/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,19 @@ use crate::streaming::{PartStreamsMap, ProposalParts};
/// Contains information about current height, round, proposals and blocks
pub struct State {
ctx: TestContext,
address: Address,

pub current_height: Height,
pub current_round: Round,
pub current_proposer: Option<Address>,

address: Address,
stream_id: u64,
undecided_proposals: HashMap<(Height, Round), ProposedValue<TestContext>>,
decided_proposals: HashMap<Height, ProposedValue<TestContext>>,
decided_values: BTreeMap<Height, DecidedValue<TestContext>>,

stream_id: u64,
streams_map: PartStreamsMap,

rng: StdRng,
}

Expand Down
Loading

0 comments on commit 5282152

Please sign in to comment.