Skip to content

Commit

Permalink
Useful procs
Browse files Browse the repository at this point in the history
  • Loading branch information
clabby committed Sep 9, 2023
1 parent 2072952 commit c64d488
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/fault/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use durin_primitives::{Claim, DisputeGame, GameStatus};

/// The [ClaimData] struct holds the data associated with a claim within a
/// [crate::FaultDisputeGame]'s state on-chain.
#[derive(Debug, Clone, Copy)]
pub struct ClaimData {
parent_index: u32,
countered: bool,
Expand All @@ -18,6 +19,7 @@ pub struct ClaimData {
/// the [FaultDisputeState] struct holds the in-memory representation of a
/// [crate::FaultDisputeGame]'s state as well as its root claim and
/// local status.
#[derive(Debug, Clone)]
pub struct FaultDisputeState {
/// The [FaultDisputeState] is modeled as a directed acyclical graph (DAG) of
/// [ClaimData] structs pointing to their parents, all the way up to the root
Expand Down
2 changes: 2 additions & 0 deletions crates/primitives/src/dispute_game.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use std::convert::TryFrom;
pub type Claim = B256;

/// The [GameType] enum is used to indicate which type of dispute game is being played.
#[derive(Debug, Clone)]
pub enum GameType {
/// The [GameType::FaultCannon] variant is used to indicate that the dispute game is being
/// played over a FaultDisputeGame with the Cannon VM as its backend source of truth.
Expand All @@ -29,6 +30,7 @@ impl TryFrom<u8> for GameType {
}

/// The [GameStatus] enum is used to indicate the status of a dispute game.
#[derive(Debug, Clone)]
pub enum GameStatus {
/// The [GameStatus::InProgress] variant is used to indicate that the dispute game is
/// still in progress.
Expand Down

0 comments on commit c64d488

Please sign in to comment.