Skip to content

Commit

Permalink
add a new error kind for failing authority discovery
Browse files Browse the repository at this point in the history
  • Loading branch information
rphmeier committed Sep 6, 2023
1 parent d65bebd commit 8a82aba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2273,7 +2273,7 @@ mod tests {
Some(v),
)).collect::<Vec<_>>();

let mut pairwise_check_topologies = |i, j| {
let pairwise_check_topologies = |i, j| {
let v_i = ValidatorIndex(i);
let v_j = ValidatorIndex(j);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ const COST_UNEXPECTED_MANIFEST_MISSING_KNOWLEDGE: Rep =
Rep::CostMinor("Unexpected Manifest, missing knowlege for relay parent");
const COST_UNEXPECTED_MANIFEST_DISALLOWED: Rep =
Rep::CostMinor("Unexpected Manifest, Peer Disallowed");
const COST_UNEXPECTED_MANIFEST_PEER_UNKNOWN: Rep =
Rep::CostMinor("Unexpected Manifest, Peer Unknown");
const COST_CONFLICTING_MANIFEST: Rep = Rep::CostMajor("Manifest conflicts with previous");
const COST_INSUFFICIENT_MANIFEST: Rep =
Rep::CostMajor("Manifest statements insufficient to back candidate");
Expand Down Expand Up @@ -1977,7 +1979,7 @@ async fn handle_incoming_manifest_common<'a, Context>(

let sender_index = match sender_index {
None => {
modify_reputation(reputation, ctx.sender(), peer, COST_UNEXPECTED_MANIFEST_DISALLOWED)
modify_reputation(reputation, ctx.sender(), peer, COST_UNEXPECTED_MANIFEST_PEER_UNKNOWN)
.await;
return None
},
Expand Down

0 comments on commit 8a82aba

Please sign in to comment.