private void initStep(final TraceFrame frame) {
    this.currentTraceFrame = frame;
    this.currentOperation = frame.getOpcode();
    currentTrace = parentTraces.peekLast();
    // set smart contract code
    if (currentTrace != null && "0x".equals(currentTrace.getCode())) {
      currentTrace.setCode(
          currentTraceFrame.getMaybeCode().orElse(CodeV0.EMPTY_CODE).getBytes().toHexString());
    }
  }
Set current trace from parents queue and retrieve next frame.

@param frame the trace frame.
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/results/tracing/vm/VmTraceGenerator.java