Fix invalid debug assertion. (#3663)

The current `debug_assert_eq` is clearly wrong as the code handles zero
response blocks. What should have been expressed is that we expect 0 or
1 response blocks.
This commit is contained in:
Toralf Wittner
2019-09-24 13:53:16 +02:00
committed by Bastian Köcher
parent af0d71d389
commit 7611c08679
+1 -1
View File
@@ -667,7 +667,7 @@ impl<B: BlockT> ChainSync<B> {
peer.state = PeerSyncState::Available;
// We only request one justification at a time
debug_assert_eq!(1, response.blocks.len());
debug_assert!(response.blocks.len() < 2);
if let Some(block) = response.blocks.into_iter().next() {
if hash != block.hash {