Skip to content

Commit

Permalink
A0-0000: Rename flag no_collection_of_extra_debugging_data to collect…
Browse files Browse the repository at this point in the history
…_validator_network_data. (#1904)

# Description

"Cherry-pick" of
a993574
. It's fine to rename param as this change will be released in the next
major release.

## Type of change

Please delete options that are not relevant.

- Bug fix (non-breaking change which fixes an issue)
- Breaking change (fix or feature that would cause existing
functionality to not work as expected)

# Testing

Run locally command:
```
 curl  -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "alephNode_unstable_validatorNetworkInfo", "params": []}' http://localhost:9944/

{"jsonrpc":"2.0","result":{"5F4H97f7nQovyrbiq4ZetaaviNwThSVcFobcA5aGab6167dK":{"session":11,"network_level_address":"127.0.0.1:30346","validator_network_peer_id":"5G8NVxeEmShiyafdkTSEoGXXqh8beqWFiaZrMWUcaHm3Pnuf"},"5DiDShBWa1fQx6gLzpf3SFBhMinCoyvHM1BWjPNsmXS8hkrW":{"session":11,"network_level_address":"127.0.0.1:30347","validator_network_peer_id":"5EKkZAotyPkhR9LQ45ePK3Pz6MEHAVT9v4rSaDaGfQ262bJu"},"5GBNeWRhZc2jXu7D55rBimKYDk8PGk8itRYFTPfC8RJLKG5o":{"session":11,"network_level_address":"127.0.0.1:30344","validator_network_peer_id":"5CnYteF2HAqBEX54cCKptwoFR3yMFJAPyjfmRYwNTdzsV9tZ"},"5Dfis6XL8J2P6JHUnUtArnFWndn62SydeP8ee8sG2ky9nfm9":{"session":11,"network_level_address":"127.0.0.1:30345","validator_network_peer_id":"5G7D18QnYUZJzCkFyJZqdGei41mZ818KMpr7yCq8rmUtPWYW"}},"id":1}⏎     
```
  • Loading branch information
Marcin-Radecki authored Dec 31, 2024
1 parent 0e6fa63 commit 7873f2a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions bin/node/src/aleph_cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ pub struct AlephCli {

/// Don't spend some extra time to collect more debugging data (e.g. validator network details).
/// By default collecting is enabled, as the impact on performance is negligible, if any.
#[clap(long, default_value_t = false)]
no_collection_of_extra_debugging_data: bool,
#[clap(long, default_value_t = true)]
collect_validator_network_data: bool,
}

impl AlephCli {
Expand Down Expand Up @@ -105,7 +105,7 @@ impl AlephCli {
self.substrate_network_bit_rate
}

pub fn no_collection_of_extra_debugging_data(&self) -> bool {
self.no_collection_of_extra_debugging_data
pub fn collect_validator_network_data(&self) -> bool {
self.collect_validator_network_data
}
}
2 changes: 1 addition & 1 deletion bin/node/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ fn get_aleph_runtime_vars(client: &Arc<FullClient>) -> AlephRuntimeVars {

fn get_validator_address_cache(aleph_config: &AlephCli) -> Option<ValidatorAddressCache> {
aleph_config
.no_collection_of_extra_debugging_data()
.collect_validator_network_data()
.then(ValidatorAddressCache::new)
}

Expand Down

0 comments on commit 7873f2a

Please sign in to comment.