Skip to content

Commit 681883b

Browse files
committed
Revert "reject empty manifests"
This reverts commit bbe01fe.
1 parent bbe01fe commit 681883b

File tree

3 files changed

+1
-12
lines changed

3 files changed

+1
-12
lines changed

polkadot/node/network/protocol/src/lib.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -637,12 +637,6 @@ pub mod v2 {
637637
}
638638
}
639639

640-
/// Returns `true` if the filter consists of zeroes.
641-
pub fn is_blank(&self) -> bool {
642-
self.seconded_in_group.leading_zeros() == self.seconded_in_group.len() &&
643-
self.validated_in_group.leading_zeros() == self.validated_in_group.len()
644-
}
645-
646640
/// Whether the filter has a specific expected length, consistent across both
647641
/// bitfields.
648642
pub fn has_len(&self, len: usize) -> bool {

polkadot/node/network/statement-distribution/src/v2/requests.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -788,11 +788,6 @@ fn validate_complete_response(
788788
return invalid_candidate_output()
789789
}
790790

791-
// If we filtered out all statements, the response is invalid.
792-
if received_filter.is_blank() {
793-
return invalid_candidate_output()
794-
}
795-
796791
statements
797792
};
798793

polkadot/node/network/statement-distribution/src/v2/tests/requests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1242,7 +1242,7 @@ fn peer_reported_for_providing_statement_from_disabled_validator() {
12421242
assert_matches!(
12431243
overseer.recv().await,
12441244
AllMessages::NetworkBridgeTx(NetworkBridgeTxMessage::ReportPeer(ReportPeerMessage::Single(p, r)))
1245-
if p == peer_b && r == COST_INVALID_RESPONSE.into() => { }
1245+
if p == peer_b && r == BENEFIT_VALID_RESPONSE.into() => { }
12461246
);
12471247

12481248
assert_matches!(

0 commit comments

Comments
 (0)