class DefaultBlockchain implements MutableBlockchain {

  @Override
  public synchronized void appendBlock(final Block block, final List<TransactionReceipt> receipts) {
    checkArgument(
        block.getBody().getTransactions().size() == receipts.size(),
        "Supplied receipts do not match block transactions.");
    if (blockIsAlreadyTracked(block)) {
      return;
    }
    checkArgument(blockIsConnected(block), "Attempt to append non-connected block.");

    final BlockAddedEvent blockAddedEvent =
        appendBlockHelper(new BlockWithReceipts(block, receipts));
    blockAddedObservers.forEach(observer -> observer.onBlockAdded(blockAddedEvent));
  }

  private  DefaultBlockchain(
      final Optional<Block> genesisBlock,
      final BlockchainStorage blockchainStorage,
      final MetricsSystem metricsSystem,
      final long reorgLoggingThreshold);

}