mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-18 09:31:02 +00:00
refactor/reputation: unify the values used (#2462)
* refactor/reputation: unify the values used * chore/rep: rename Annoy* to Cost*, make duplicate message Cost*Repeated * fix/reputation: lost and found, convert at the boundary to substrate * refactor/rep: move conversion to base reputation one level down, left conversions * fix/rep: order of magnitude adjustments Thanks pierre! * remove spaces * chore/rep: give rationale for order of magnitude * refactor/rep: move UnifiedReputationChange to separate file * fix/rep: order of magnitudes correction
This commit is contained in:
committed by
GitHub
parent
62c5896592
commit
1e2161258b
@@ -43,7 +43,7 @@ use polkadot_subsystem::{
|
||||
},
|
||||
};
|
||||
use polkadot_node_network_protocol::{
|
||||
peer_set::PeerSet, v1 as protocol_v1, PeerId, ReputationChange as Rep, RequestId,
|
||||
peer_set::PeerSet, v1 as protocol_v1, PeerId, RequestId, UnifiedReputationChange as Rep,
|
||||
};
|
||||
use polkadot_node_subsystem_util::{
|
||||
Timeout, TimeoutExt,
|
||||
@@ -57,8 +57,8 @@ mod tests;
|
||||
|
||||
const LOG_TARGET: &str = "availability_recovery";
|
||||
|
||||
const COST_MERKLE_PROOF_INVALID: Rep = Rep::new(-100, "Merkle proof was invalid");
|
||||
const COST_UNEXPECTED_CHUNK: Rep = Rep::new(-100, "Peer has sent an unexpected chunk");
|
||||
const COST_MERKLE_PROOF_INVALID: Rep = Rep::CostMinor("Merkle proof was invalid");
|
||||
const COST_UNEXPECTED_CHUNK: Rep = Rep::CostMinor("Peer has sent an unexpected chunk");
|
||||
|
||||
// How many parallel requests interaction should have going at once.
|
||||
const N_PARALLEL: usize = 50;
|
||||
|
||||
Reference in New Issue
Block a user