Skip to content

Commit

Permalink
Use super owners in benchmarking
Browse files Browse the repository at this point in the history
  • Loading branch information
bart-linera committed Nov 18, 2024
1 parent 1eec5ee commit 1701941
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions linera-base/src/ownership.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@ pub struct ChainOwnership {
}

impl ChainOwnership {
/// Creates a `ChainOwnership` with a single super owner.
pub fn single_super(public_key: PublicKey) -> Self {
ChainOwnership {
super_owners: iter::once((Owner::from(public_key), public_key)).collect(),
owners: BTreeMap::new(),
multi_leader_rounds: 2,
timeout_config: TimeoutConfig::default(),
}
}

/// Creates a `ChainOwnership` with a single regular owner.
pub fn single(public_key: PublicKey) -> Self {
ChainOwnership {
Expand Down
2 changes: 1 addition & 1 deletion linera-client/src/client_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ where
// Put at most 1000 OpenChain operations in each block.
let num_new_chains = (num_chains - key_pairs.len()).min(1000);
let config = OpenChainConfig {
ownership: ChainOwnership::single(public_key),
ownership: ChainOwnership::single_super(public_key),
committees,
admin_id: self.wallet.genesis_admin_chain(),
epoch,
Expand Down

0 comments on commit 1701941

Please sign in to comment.