class IbftLegacyBlockInterface implements BlockInterface {

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

}