mirror of
https://github.com/vacp2p/status-linea-besu.git
synced 2026-01-09 13:58:02 -05:00
Fleet-mode safe behavior for fcU in SynchronizationService (#7517)
* fleet-mode safe behavior for fcU in SynchronizationService Signed-off-by: garyschulte <garyschulte@gmail.com> * spotless Signed-off-by: garyschulte <garyschulte@gmail.com> --------- Signed-off-by: garyschulte <garyschulte@gmail.com>
This commit is contained in:
@@ -74,17 +74,11 @@ public class SynchronizationServiceImpl implements SynchronizationService {
|
||||
@Override
|
||||
public void fireNewUnverifiedForkchoiceEvent(
|
||||
final Hash head, final Hash safeBlock, final Hash finalizedBlock) {
|
||||
final MergeContext mergeContext = protocolContext.getConsensusContext(MergeContext.class);
|
||||
if (mergeContext != null) {
|
||||
mergeContext.fireNewUnverifiedForkchoiceEvent(head, safeBlock, finalizedBlock);
|
||||
protocolContext.getBlockchain().setFinalized(finalizedBlock);
|
||||
protocolContext.getBlockchain().setSafeBlock(safeBlock);
|
||||
} else {
|
||||
LOG.atWarn()
|
||||
.setMessage(
|
||||
"The merge context is unavailable, hence the fork choice event cannot be triggered")
|
||||
.log();
|
||||
}
|
||||
protocolContext
|
||||
.safeConsensusContext(MergeContext.class)
|
||||
.ifPresent(mc -> mc.fireNewUnverifiedForkchoiceEvent(head, safeBlock, finalizedBlock));
|
||||
protocolContext.getBlockchain().setFinalized(finalizedBlock);
|
||||
protocolContext.getBlockchain().setSafeBlock(safeBlock);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user