Skip to content

Commit

Permalink
pos/state_machine: update test with new validator set
Browse files Browse the repository at this point in the history
  • Loading branch information
brentstone committed Jun 16, 2023
1 parent 0a13b69 commit 396d5ce
Show file tree
Hide file tree
Showing 2 changed files with 358 additions and 88 deletions.
14 changes: 14 additions & 0 deletions proof_of_stake/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,20 @@ where
.collect()
}

/// Read all addresses from the below-threshold set
pub fn read_below_threshold_validator_set_addresses<S>(
storage: &S,
epoch: namada_core::types::storage::Epoch,
) -> storage_api::Result<HashSet<Address>>
where
S: StorageRead,
{
below_threshold_validator_set_handle()
.at(&epoch)
.iter(storage)?
.collect()
}

/// Read all addresses from consensus validator set with their stake.
pub fn read_consensus_validator_set_addresses_with_stake<S>(
storage: &S,
Expand Down
Loading

0 comments on commit 396d5ce

Please sign in to comment.