private static void writeLegacyReceipt(
      final TransactionReceipt receipt,
      final RLPOutput rlpOutput,
      final TransactionReceiptEncodingConfiguration options) {
    if (!receipt.getTransactionType().equals(TransactionType.FRONTIER)) {
      rlpOutput.writeIntScalar(receipt.getTransactionType().getSerializedType());
    }
    rlpOutput.startList();
    writeStatusOrStateRoot(receipt, rlpOutput);
    rlpOutput.writeLongScalar(receipt.getCumulativeGasUsed());
    if (options.isWithBloomFilter()) {
      rlpOutput.writeBytes(receipt.getBloomFilter());
    }
    writeLogs(receipt, rlpOutput, options);
    if (options.isWithRevertReason() && receipt.getRevertReason().isPresent()) {
      rlpOutput.writeBytes(receipt.getRevertReason().get());
    }
    rlpOutput.endList();
  }
Writes the transaction receipt to the output.

@param receipt the transaction receipt
@param rlpOutput the RLP output
@param options the encoding options
ethereum/core/src/main/java/org/hyperledger/besu/ethereum/core/encoding/receipt/TransactionReceiptEncoder.java