changes MergeCoordinator fields to protected to allow extension; (#4287)

Signed-off-by: Pedro Novais <jpvnovais@gmail.com>

Co-authored-by: Antony Denyer <git@antonydenyer.co.uk>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
pull/4316/head
Pedro Novais 2 years ago committed by GitHub
parent b257791498
commit c5ae9f5da9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 21
      consensus/merge/src/main/java/org/hyperledger/besu/consensus/merge/blockcreation/MergeCoordinator.java

@ -56,15 +56,16 @@ import org.slf4j.LoggerFactory;
public class MergeCoordinator implements MergeMiningCoordinator, BadChainListener {
private static final Logger LOG = LoggerFactory.getLogger(MergeCoordinator.class);
final AtomicLong targetGasLimit;
final MiningParameters miningParameters;
final MergeBlockCreatorFactory mergeBlockCreator;
final AtomicReference<Bytes> extraData = new AtomicReference<>(Bytes.fromHexString("0x"));
final AtomicReference<BlockHeader> latestDescendsFromTerminal = new AtomicReference<>();
private final MergeContext mergeContext;
private final ProtocolContext protocolContext;
private final BackwardSyncContext backwardSyncContext;
private final ProtocolSchedule protocolSchedule;
protected final AtomicLong targetGasLimit;
protected final MiningParameters miningParameters;
protected final MergeBlockCreatorFactory mergeBlockCreator;
protected final AtomicReference<Bytes> extraData =
new AtomicReference<>(Bytes.fromHexString("0x"));
protected final AtomicReference<BlockHeader> latestDescendsFromTerminal = new AtomicReference<>();
protected final MergeContext mergeContext;
protected final ProtocolContext protocolContext;
protected final BackwardSyncContext backwardSyncContext;
protected final ProtocolSchedule protocolSchedule;
public MergeCoordinator(
final ProtocolContext protocolContext,
@ -594,7 +595,7 @@ public class MergeCoordinator implements MergeMiningCoordinator, BadChainListene
}
@FunctionalInterface
interface MergeBlockCreatorFactory {
protected interface MergeBlockCreatorFactory {
MergeBlockCreator forParams(BlockHeader header, Optional<Address> feeRecipient);
}

Loading…
Cancel
Save