mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 20:27:58 +00:00
remove statement::invalid (#2597)
This commit is contained in:
committed by
GitHub
parent
639dcc2e75
commit
9331e06eda
@@ -179,7 +179,7 @@ impl PeerRelayParentKnowledge {
|
||||
|
||||
self.known_candidates.insert(h.clone())
|
||||
},
|
||||
CompactStatement::Valid(ref h) | CompactStatement::Invalid(ref h) => {
|
||||
CompactStatement::Valid(ref h) => {
|
||||
// The peer can only accept Valid and Invalid statements for which it is aware
|
||||
// of the corresponding candidate.
|
||||
if !self.known_candidates.contains(h) {
|
||||
@@ -235,7 +235,7 @@ impl PeerRelayParentKnowledge {
|
||||
|
||||
h
|
||||
}
|
||||
CompactStatement::Valid(ref h)| CompactStatement::Invalid(ref h) => {
|
||||
CompactStatement::Valid(ref h) => {
|
||||
if !self.known_candidates.contains(&h) {
|
||||
return Err(COST_UNEXPECTED_STATEMENT);
|
||||
}
|
||||
@@ -454,7 +454,7 @@ impl ActiveHeadData {
|
||||
NotedStatement::UsefulButKnown
|
||||
}
|
||||
}
|
||||
CompactStatement::Valid(h) | CompactStatement::Invalid(h) => {
|
||||
CompactStatement::Valid(h) => {
|
||||
if !self.candidates.contains(&h) {
|
||||
return NotedStatement::NotUseful;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user