Skip to content

Commit 8f6d4b0

Browse files
committed
return fixes
1 parent b3084df commit 8f6d4b0

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

txemulator/trace.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ func (t *Tracer) Run(ctx context.Context, message tlb.Message, signatureIgnoreDe
228228
for _, task := range tasks {
229229
child, err := task.run()
230230
if err != nil {
231-
return root, err
231+
return nil, err
232232
}
233233
task.parent.Children[task.idx] = child
234234
}
@@ -305,29 +305,29 @@ func (t *Tracer) run(ctx context.Context, message tlb.Message, signatureIgnoreDe
305305
return nil, err
306306
}
307307
}
308-
result, err := t.e.Emulate(state, message)
308+
emulationRes, err := t.e.Emulate(state, message)
309309
if err != nil {
310310
return nil, err
311311
}
312-
if result.Error != nil {
312+
if emulationRes.Error != nil {
313313
return nil, ErrorWithExitCode{
314-
Message: fmt.Sprintf("iteration: %v, exitCode: %v, Text: %v, ", t.counter, result.Error.ExitCode, result.Error.Text),
315-
ExitCode: result.Error.ExitCode,
314+
Message: fmt.Sprintf("iteration: %v, exitCode: %v, Text: %v, ", t.counter, emulationRes.Error.ExitCode, emulationRes.Error.Text),
315+
ExitCode: emulationRes.Error.ExitCode,
316316
Iteration: t.counter,
317317
}
318318
}
319-
if result.Emulation == nil {
319+
if emulationRes.Emulation == nil {
320320
return nil, fmt.Errorf("empty emulation result on iteration %v", t.counter)
321321
}
322322
t.counter++
323-
t.currentShardAccount[*accountAddr] = result.Emulation.ShardAccount
323+
t.currentShardAccount[*accountAddr] = emulationRes.Emulation.ShardAccount
324324

325325
tree := &TxTree{
326-
TX: result.Emulation.Transaction,
326+
TX: emulationRes.Emulation.Transaction,
327327
}
328328

329329
var outs []tlb.Message
330-
for _, m := range result.Emulation.Transaction.Msgs.OutMsgs.Values() {
330+
for _, m := range emulationRes.Emulation.Transaction.Msgs.OutMsgs.Values() {
331331
if m.Value.Info.SumType == "ExtOutMsgInfo" {
332332
continue
333333
}
@@ -361,11 +361,11 @@ func (t *Tracer) run(ctx context.Context, message tlb.Message, signatureIgnoreDe
361361
}
362362
child, err := t.run(ctx, msg, childDepth)
363363
if err != nil {
364-
return tree, err
364+
return nil, err
365365
}
366366
tree.Children[i] = child
367367
}
368-
return tree, err
368+
return tree, nil
369369
}
370370

371371
func (t *Tracer) addRandomDelay() error {

0 commit comments

Comments
 (0)