You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
received_chain_headers.last().expect("chain can not be empty").parent_hash
352
+
received_chain_headers.front().expect("chain can not be empty").parent_hash
353
353
}){
354
354
// If the received fork is older than the current chain, we return an event
355
355
// indicating that we have received an old fork.
356
356
if(pos < current_chain_headers.len() - 1) &&
357
357
current_chain_headers.get(pos + 1).expect("chain can not be empty").timestamp >
358
358
received_chain_headers
359
-
.last()
359
+
.front()
360
360
.expect("chain can not be empty")
361
361
.timestamp
362
362
{
363
363
returnOk(ChainOrchestratorEvent::OldForkReceived{
364
-
headers: received_chain_headers,
364
+
headers: received_chain_headers.into(),
365
365
peer_id,
366
366
signature,
367
367
});
368
368
}
369
369
break pos;
370
370
}
371
371
372
-
tracing::trace!(target:"scroll::chain_orchestrator", number = ?(received_chain_headers.last().expect("chain can not be empty").number - 1),"fetching block");
372
+
tracing::trace!(target:"scroll::chain_orchestrator", number = ?(received_chain_headers.front().expect("chain can not be empty").number - 1),"fetching block");
373
373
ifletSome(header) = network_client
374
374
.get_header(BlockHashOrNumber::Hash(
375
-
received_chain_headers.last().expect("chain can not be empty").parent_hash,
375
+
received_chain_headers.front().expect("chain can not be empty").parent_hash,
0 commit comments