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 @@ -279,14 +279,15 @@ impl<C: Cache> ChainNotifier<C> {
279
279
let mut previous = * prev_header;
280
280
loop {
281
281
// Found the parent block.
282
- if current. height == previous. height + 1 &&
283
- current. header . prev_blockhash == previous. block_hash {
282
+ if current. header . prev_blockhash == previous. block_hash {
283
+ debug_assert_eq ! ( current. height , previous. height + 1 ) ;
284
284
steps. push ( ForkStep :: ConnectBlock ( current) ) ;
285
285
break ;
286
286
}
287
287
288
288
// Found a chain fork.
289
289
if current. header . prev_blockhash == previous. header . prev_blockhash {
290
+ debug_assert_eq ! ( current. height, previous. height) ;
290
291
let fork_point = self . look_up_previous_header ( chain_poller, & previous) . await ?;
291
292
steps. push ( ForkStep :: DisconnectBlock ( previous) ) ;
292
293
steps. push ( ForkStep :: ConnectBlock ( current) ) ;
You can’t perform that action at this time.
0 commit comments