Skip to content

Commit

Permalink
removes pandas (hyperledger#4472)
Browse files Browse the repository at this point in the history
* removes pandas

Signed-off-by: Justin Florentine <justin+github@florentine.us>
  • Loading branch information
jflo authored Oct 6, 2022
1 parent e179b86 commit e4477f9
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 502 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import org.hyperledger.besu.config.GenesisConfigFile;
import org.hyperledger.besu.config.GenesisConfigOptions;
import org.hyperledger.besu.consensus.merge.MergeContext;
import org.hyperledger.besu.consensus.merge.PandaPrinter;
import org.hyperledger.besu.consensus.merge.PostMergeContext;
import org.hyperledger.besu.consensus.merge.TransitionBackwardSyncContext;
import org.hyperledger.besu.consensus.merge.TransitionContext;
Expand All @@ -31,7 +30,6 @@
import org.hyperledger.besu.ethereum.ProtocolContext;
import org.hyperledger.besu.ethereum.blockcreation.MiningCoordinator;
import org.hyperledger.besu.ethereum.chain.Blockchain;
import org.hyperledger.besu.ethereum.core.Difficulty;
import org.hyperledger.besu.ethereum.core.MiningParameters;
import org.hyperledger.besu.ethereum.core.PrivacyParameters;
import org.hyperledger.besu.ethereum.core.Synchronizer;
Expand Down Expand Up @@ -218,17 +216,6 @@ protected Synchronizer createSynchronizer(
LOG.info(
"TTD present, creating DefaultSynchronizer that stops propagating after finalization");
protocolContext.getConsensusContext(MergeContext.class).addNewForkchoiceMessageListener(sync);
Optional<Difficulty> currentTotal =
protocolContext
.getBlockchain()
.getTotalDifficultyByHash(protocolContext.getBlockchain().getChainHeadHash());
PandaPrinter.init(
currentTotal, Difficulty.of(maybeForTTD.getTerminalTotalDifficulty().get()));
sync.subscribeInSync(PandaPrinter.getInstance());
protocolContext.getBlockchain().observeBlockAdded(PandaPrinter.getInstance());
protocolContext
.getConsensusContext(MergeContext.class)
.addNewForkchoiceMessageListener(PandaPrinter.getInstance());
}

return sync;
Expand All @@ -249,11 +236,6 @@ private void initTransitionWatcher(
.getBlockchain()
.setBlockChoiceRule((newBlockHeader, currentBlockHeader) -> -1);

if (priorState.filter(prior -> !prior).isPresent()) {
// only print pandas if we had a prior merge state, and it was false
PandaPrinter.getInstance().printOnFirstCrossing();
}

} else if (composedCoordinator.isMiningBeforeMerge()) {
// if our merge state is set to mine pre-merge and we are mining, start mining
composedCoordinator.getPreMergeObject().enable();
Expand Down

This file was deleted.

58 changes: 0 additions & 58 deletions consensus/merge/src/main/resources/finalizedPanda.txt

This file was deleted.

Loading

0 comments on commit e4477f9

Please sign in to comment.