Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
tbenr committed Feb 28, 2025
1 parent e773966 commit cba0696
Showing 1 changed file with 15 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
import tech.pegasys.teku.spec.logic.versions.deneb.blobs.BlobSidecarsAvailabilityChecker;
import tech.pegasys.teku.statetransition.attestation.DeferredAttestations;
import tech.pegasys.teku.statetransition.blobs.BlobSidecarManager;
import tech.pegasys.teku.statetransition.blobs.BlobSidecarManager.RemoteOrigin;
import tech.pegasys.teku.statetransition.block.BlockImportPerformance;
import tech.pegasys.teku.statetransition.util.DebugDataDumper;
import tech.pegasys.teku.statetransition.validation.AttestationStateSelector;
Expand Down Expand Up @@ -594,17 +593,19 @@ private BlockImportResult importBlockAndState(
blobSidecars,
earliestBlobSidecarsSlot);


final boolean reorg;
if (recentChainData.getBestBlockRoot().map(root -> !root.equals(block.getParentRoot())).orElse(false)) {
LOG.info("Reorg detected. Parent block root: {}", block.getParentRoot());
reorg = true;
if (recentChainData
.getBestBlockRoot()
.map(root -> !root.equals(block.getParentRoot()))
.orElse(false)) {
LOG.info("Reorg detected. Parent block root: {}", block.getParentRoot());
reorg = true;
} else {
reorg = false;
reorg = false;
}

if(shouldApplyProposerBoost(block, transaction)) {
LOG.info("Applying proposer boost for block at slot {}", block.getSlot());
if (shouldApplyProposerBoost(block, transaction)) {
LOG.info("Applying proposer boost for block at slot {}", block.getSlot());
transaction.setProposerBoostRoot(block.getRoot());
}

Expand Down Expand Up @@ -637,8 +638,8 @@ private BlockImportResult importBlockAndState(
updateForkChoiceForImportedBlock(block, result, forkChoiceStrategy);
notifyForkChoiceUpdatedAndOptimisticSyncingChanged(Optional.empty());

if(reorg) {
processHead(block.getSlot()).ifExceptionGetsHereRaiseABug();
if (reorg) {
processHead(block.getSlot()).ifExceptionGetsHereRaiseABug();
}

return result;
Expand All @@ -649,7 +650,10 @@ private boolean shouldApplyProposerBoost(
final SignedBeaconBlock block, final StoreTransaction transaction) {
// get_current_slot(store) == block.slot

LOG.info("shouldApplyProposerBoost - current slot: {}, block slot: {}", spec.getCurrentSlot(transaction), block.getSlot());
LOG.info(
"shouldApplyProposerBoost - current slot: {}, block slot: {}",
spec.getCurrentSlot(transaction),
block.getSlot());
if (!spec.getCurrentSlot(transaction).equals(block.getSlot())) {
return false;
}
Expand Down

0 comments on commit cba0696

Please sign in to comment.