begin allowing test framework to generate forks
This commit is contained in:
@@ -99,6 +99,11 @@ func (a *ChainAPI) ChainGetParentMessages(ctx context.Context, bcid cid.Cid) ([]
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// genesis block has no parent messages...
|
||||
if b.Height == 0 {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// TODO: need to get the number of messages better than this
|
||||
pts, err := a.Chain.LoadTipSet(b.Parents)
|
||||
if err != nil {
|
||||
@@ -124,6 +129,10 @@ func (a *ChainAPI) ChainGetParentReceipts(ctx context.Context, bcid cid.Cid) ([]
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if b.Height == 0 {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// TODO: need to get the number of messages better than this
|
||||
pts, err := a.Chain.LoadTipSet(b.Parents)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user