From 8e51ab8375d6f97683483c991217d178d7ae8fad Mon Sep 17 00:00:00 2001 From: whyrusleeping Date: Wed, 9 Oct 2019 17:56:47 +0900 Subject: [PATCH] don't bother looking in genesis block for messages --- chain/stmgr/stmgr.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/chain/stmgr/stmgr.go b/chain/stmgr/stmgr.go index 6ef9838a8..6405482f0 100644 --- a/chain/stmgr/stmgr.go +++ b/chain/stmgr/stmgr.go @@ -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 } }