Add a flag to disable peer scoring (#4135)

## Issue Addressed

N/A

## Proposed Changes

Adds a flag for disabling peer scoring. This is useful for local testing and testing small networks for new features.
This commit is contained in:
Pawan Dhananjay
2023-04-12 01:48:19 +00:00
parent 4d17fb3af6
commit 3b117f4bf6
10 changed files with 65 additions and 5 deletions

View File

@@ -1008,6 +1008,10 @@ pub fn set_network_config(
.collect::<Result<Vec<Multiaddr>, _>>()?;
}
if cli_args.is_present("disable-peer-scoring") {
config.disable_peer_scoring = true;
}
if let Some(trusted_peers_str) = cli_args.value_of("trusted-peers") {
config.trusted_peers = trusted_peers_str
.split(',')