fix(lotus-sim): obey context in walk
This commit is contained in:
parent
ca9eadd7c7
commit
68593ce995
@ -297,7 +297,7 @@ func (sim *Simulation) Walk(
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
for !ts.Equals(sim.start) {
|
||||
for !ts.Equals(sim.start) && ctx.Err() == nil {
|
||||
msgs, err := sim.Chainstore.MessagesForTipset(ts)
|
||||
if err != nil {
|
||||
return err
|
||||
@ -331,5 +331,5 @@ func (sim *Simulation) Walk(
|
||||
return xerrors.Errorf("loading parent: %w", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
return ctx.Err()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user