Skip to content
This repository has been archived by the owner on Feb 6, 2025. It is now read-only.

fix: bsc panic in fullnode mode #183

Merged
merged 1 commit into from
Nov 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 12 additions & 13 deletions crates/bsc/engine/src/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -421,21 +421,20 @@ impl<
}
for header in disconnected_headers {
storage.insert_new_header(header.clone());
let result =
fork_choice_tx.send(ForkChoiceMessage::NewHeader(NewHeaderEvent {
header: header.clone(),
// if the pipeline sync is true, the fork choice will not use the safe
// and finalized hash.
// this can make Block Sync Engine to use pipeline sync mode.
pipeline_sync,
local_header: latest_unsafe_header.clone(),
}));
if result.is_err() {
error!(target: "consensus::parlia", "Failed to send new block event to
fork choice");
}
}
drop(storage);
let result = fork_choice_tx.send(ForkChoiceMessage::NewHeader(NewHeaderEvent {
header: sealed_header.clone(),
// if the pipeline sync is true, the fork choice will not use the safe
// and finalized hash.
// this can make Block Sync Engine to use pipeline sync mode.
pipeline_sync,
local_header: latest_unsafe_header.clone(),
}));
if result.is_err() {
error!(target: "consensus::parlia", "Failed to send new block event to
fork choice");
}

let result = chain_tracker_tx.send(ForkChoiceMessage::NewHeader(NewHeaderEvent {
header: sealed_header.clone(),
Expand Down