handle looking for messages executed by the genesis block

This commit is contained in:
whyrusleeping 2019-10-02 14:49:38 -06:00
parent f15557649f
commit 8903fb4f19

View File

@ -701,6 +701,11 @@ func (cs *ChainStore) WaitForMessage(ctx context.Context, mcid cid.Cid) (*types.
}
func (cs *ChainStore) tipsetExecutedMessage(ts *types.TipSet, msg cid.Cid) (*types.MessageReceipt, error) {
// The genesis block did not execute any messages
if ts.Height() == 0 {
return nil, nil
}
pts, err := cs.LoadTipSet(ts.Parents())
if err != nil {
return nil, err