Skip to content

Commit

Permalink
cargo fmt --all -- --config imports_granularity=Crate
Browse files Browse the repository at this point in the history
  • Loading branch information
SurfingNerd committed Apr 22, 2024
1 parent 13b9405 commit 61363cc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,11 @@ fn main() {

//let pub_keys = enodes_to_pub_keys(&enodes_map);

let enodes_for_key : Vec<Enode> = enodes.iter().take(num_nodes_validators).map(|e| e.clone()).collect();
let enodes_for_key: Vec<Enode> = enodes
.iter()
.take(num_nodes_validators)
.map(|e| e.clone())
.collect();

let pub_keys_for_key_gen_btree = enodes_to_pub_keys(&enodes_for_key);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ impl HbbftNetworkForkManager {
}

if fork_definition_config.len() == 0 {

self.is_init = true;
return;
}
Expand Down Expand Up @@ -275,15 +274,12 @@ impl HbbftNetworkForkManager {
let fork = HbbftFork::from_definition(fork_def);
debug!(target: "engine", "hbbft-hardfork: added upcomming fork - add block {:?}", fork.start_block);

self.pending_forks
.push_back(fork);
self.pending_forks.push_back(fork);
} else if fork_def.block_number_start >= startup_block_number {

let fork = HbbftFork::from_definition(fork_def);
debug!(target: "engine", "hbbft-hardfork: added upcomming fork - add block {:?}", fork.start_block);

self.pending_forks
.push_back(fork);
self.pending_forks.push_back(fork);
}
}

Expand Down
3 changes: 1 addition & 2 deletions crates/ethcore/src/engines/hbbft/hbbft_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,12 @@ impl HbbftState {
self.public_master_key = Some(network_info.public_key_set().public_key());
self.honey_badger = Some(self.new_honey_badger(network_info.clone())?);

for x in network_info.validator_set().all_ids() {
for x in network_info.validator_set().all_ids() {
info!(target: "engine", "Validator: {:?}", x);
}

self.network_info = Some(network_info);
self.last_fork_start_block = Some(last_block_number);


has_forked = true;
}
Expand Down

0 comments on commit 61363cc

Please sign in to comment.