don't bother looking in genesis block for messages

This commit is contained in:
whyrusleeping 2019-10-09 17:56:47 +09:00
parent a71772ae18
commit 8e51ab8375

View File

@ -359,6 +359,11 @@ func (sm *StateManager) searchBackForMsg(ctx context.Context, from *types.TipSet
cur := from
for {
if cur.Height() == 0 {
// it ain't here!
return nil, nil, nil
}
select {
case <-ctx.Done():
return nil, nil, nil
@ -390,11 +395,6 @@ func (sm *StateManager) searchBackForMsg(ctx context.Context, from *types.TipSet
return ts, r, nil
}
if ts.Height() == 0 {
// it ain't here!
return nil, nil, nil
}
cur = ts
}
}