Merge pull request #306 from filecoin-project/fix/msg-search-back

don't bother looking in genesis block for messages
This commit is contained in:
Łukasz Magiera 2019-10-09 11:00:23 +02:00 committed by GitHub
commit 719f20d091
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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