File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -283,14 +283,15 @@ impl<C: Cache> ChainNotifier<C> {
283
283
let mut previous = * prev_header;
284
284
loop {
285
285
// Found the parent block.
286
- if current. height == previous. height + 1 &&
287
- current. header . prev_blockhash == previous. block_hash {
286
+ if current. header . prev_blockhash == previous. block_hash {
287
+ debug_assert_eq ! ( current. height , previous. height + 1 ) ;
288
288
steps. push ( ForkStep :: ConnectBlock ( current) ) ;
289
289
break ;
290
290
}
291
291
292
292
// Found a chain fork.
293
293
if current. header . prev_blockhash == previous. header . prev_blockhash {
294
+ debug_assert_eq ! ( current. height, previous. height) ;
294
295
let fork_point = self . look_up_previous_header ( chain_poller, & previous) . await ?;
295
296
steps. push ( ForkStep :: DisconnectBlock ( previous) ) ;
296
297
steps. push ( ForkStep :: ConnectBlock ( current) ) ;
You can’t perform that action at this time.
0 commit comments