mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 13:17:56 +00:00
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:
committed by
Bastian Köcher
parent
af0d71d389
commit
7611c08679
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user