@Override
  public BigInteger getV() {
    if (transactionType != null && transactionType != TransactionType.FRONTIER) {
      // EIP-2718 typed transaction, use yParity:
      return null;
    } else {
      final BigInteger recId = BigInteger.valueOf(signature.getRecId());
      return chainId
          .map(bigInteger -> recId.add(REPLAY_PROTECTED_V_BASE).add(TWO.multiply(bigInteger)))
          .orElseGet(() -> recId.add(REPLAY_UNPROTECTED_V_BASE));
    }
  }
Writes the transaction to RLP using the specified format

@param out the output to write the transaction to
@param context the serialization format to use
ethereum/core/src/main/java/org/hyperledger/besu/ethereum/core/Transaction.java