Balance transfers associated with CALL's and CREATE's are done in the start
method as follows:
public void process(final MessageFrame frame, final OperationTracer operationTracer) {
if (operationTracer != null) {
if (frame.getState() == MessageFrame.State.NOT_STARTED) {
operationTracer.traceContextEnter(frame);
start(frame, operationTracer);
}
See in Besu.
The main point being that traceContextEnter
happens before. However, for some reason the warming of the createe has already taken place.
The same pattern seems to be at play when invoking traceContextExit
:
public void process(final MessageFrame frame, final OperationTracer operationTracer) {
// ...
if (frame.getState() == MessageFrame.State.COMPLETED_SUCCESS) {
if (operationTracer != null) {
operationTracer.traceContextExit(frame);
}
completedSuccess(frame);
}
if (frame.getState() == MessageFrame.State.COMPLETED_FAILED) {
if (operationTracer != null) {
operationTracer.traceContextExit(frame);
}
completedFailed(frame);
}