public static BlockHeaderBuilder createHeaderBuilderWithVoteHeaders(
      final BlockHeaderBuilder builder, final Optional<ValidatorVote> vote) {
    final BlockHeaderBuilder voteHeaderBuilder = BlockHeaderBuilder.fromBuilder(builder);
    if (vote.isPresent()) {
      final ValidatorVote voteToCast = vote.get();
      voteHeaderBuilder.nonce(voteToValue.get(voteToCast.getVotePolarity()));
      voteHeaderBuilder.coinbase(voteToCast.getRecipient());
    } else {
      voteHeaderBuilder.nonce(voteToValue.get(VoteType.DROP));
      voteHeaderBuilder.coinbase(NO_VOTE_SUBJECT);
    }
    return voteHeaderBuilder;
  }
Create header builder with vote headers.

@param builder the builder
@param vote the vote
@return the block header builder
consensus/clique/src/main/java/org/hyperledger/besu/consensus/clique/CliqueBlockInterface.java