private static TransactionReceipt createReceipt(
      final TransactionType transactionType,
      final RLPInput statusOrStateRoot,
      final long cumulativeGas,
      final List<Log> logs,
      final LogsBloomFilter bloomFilter,
      final Optional<Bytes> revertReason) {
    if (statusOrStateRoot.raw().size() == 1) {
      final int status = statusOrStateRoot.readIntScalar();
      return new TransactionReceipt(
          transactionType, status, cumulativeGas, logs, bloomFilter, revertReason);
    } else {
      final Hash stateRoot = Hash.wrap(statusOrStateRoot.readBytes32());
      return new TransactionReceipt(
          transactionType, stateRoot, cumulativeGas, logs, bloomFilter, revertReason);
    }
  }
Creates a transaction receipt for the given RLP

@param rlpInput the RLP-encoded transaction receipt
@param revertReasonAllowed whether the rlp input is allowed to have a revert reason
@return the transaction receipt
ethereum/core/src/main/java/org/hyperledger/besu/ethereum/core/encoding/receipt/TransactionReceiptDecoder.java