@Override
  public <C extends ConsensusContext> C getConsensusContext(
      final Class<C> klass, final long blockNumber) {
    return consensusContextSchedule.getFork(blockNumber).getValue().as(klass);
  }
Instantiates a new Migrating protocol context.

@param blockchain the blockchain
@param worldStateArchive the world state archive
@param migratingConsensusContext the consensus context
@param badBlockManager the cache to use to keep invalid blocks
@param serviceManager the plugin service manager
consensus/common/src/main/java/org/hyperledger/besu/consensus/common/MigratingProtocolContext.java