private void updateChainState(
      final EthPeer peer, final long blockHeight, final Difficulty totalDifficulty) {
    // Chain state is updated based on the parent of the announced block
    // So, increment block number by 1 and set block difficulty to zero
    // in order to update to the values we want
    final BlockHeader header =
        new BlockHeaderTestFixture()
            .number(blockHeight + 1L)
            .difficulty(Difficulty.ZERO)
            .buildHeader();
    peer.chainState().updateForAnnouncedBlock(header, totalDifficulty);

    // Sanity check this logic still holds
    assertThat(peer.chainState().getEstimatedHeight()).isEqualTo(blockHeight);
    assertThat(peer.chainState().getEstimatedTotalDifficulty()).isEqualTo(totalDifficulty);
  }
Updates the chain state, such that the peer will end up with an estimated height of {@code
blockHeight} and an estimated total difficulty of {@code totalDifficulty}

@param peer The peer whose chain should be updated
@param blockHeight The target estimated block height
@param totalDifficulty The total difficulty
ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/state/SyncStateTest.java