Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

consensus: create new config for each authority #1916

Merged
merged 1 commit into from
May 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sui/src/sui_commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,14 +320,14 @@ impl SuiNetwork {
);

let consensus_committee = make_default_narwhal_committee(&config.authorities)?;
let consensus_parameters = ConsensusParameters::default();

// Pass in the newtwork parameters of all authorities
let net = config.get_authority_infos();

let mut spawned_authorities = Vec::new();

for authority in &config.authorities {
let consensus_parameters = ConsensusParameters::default();
let key_pair = key_pairs.get(&authority.public_key).unwrap_or_else(|| {
panic!(
"Can't find key pair for authority {:?}",
Expand Down
10 changes: 5 additions & 5 deletions test_utils/src/authority.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,17 @@ where
{
let states = test_authority_states(objects).await;
let consensus_committee = make_default_narwhal_committee(authorities).unwrap();
let consensus_parameters = ConsensusParameters {
max_header_delay: std::time::Duration::from_millis(200),
header_size: 1,
..ConsensusParameters::default()
};
let mut handles = Vec::new();
for ((state, config), key_pair) in states
.into_iter()
.zip(authorities.iter())
.zip(key_pairs.iter())
{
let consensus_parameters = ConsensusParameters {
max_header_delay: std::time::Duration::from_millis(200),
header_size: 1,
..ConsensusParameters::default()
};
let handle = make_authority(
/* authority */ config,
key_pair,
Expand Down