private static boolean hasRevertInSubCall(
      final TransactionTrace transactionTrace, final TraceFrame callFrame) {
    for (int i = 0; i < transactionTrace.getTraceFrames().size(); i++) {
      if (i + 1 < transactionTrace.getTraceFrames().size()) {
        final TraceFrame next = transactionTrace.getTraceFrames().get(i + 1);
        if (next.getDepth() == callFrame.getDepth()) {
          if (next.getOpcodeNumber() == RevertOperation.OPCODE) {
            return true;
          } else if (next.getOpcodeNumber() == ReturnOperation.OPCODE) {
            return false;
          }
        }
      }
    }
    return false;
  }
Generates a stream of {@link Trace} from the passed {@link TransactionTrace} and {@link Block}
data with additional Transaction Information added to FlatTrace

@param protocolSchedule the current {@link ProtocolSchedule} to use
@param transactionTrace the {@link TransactionTrace} to use
@param block the {@link Block} to use
@return a stream of generated traces {@link Trace}
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/results/tracing/flat/FlatTraceGenerator.java