new api to calculate arbitrary forks revert and applys

Signed-off-by: jsign <jsign.uy@gmail.com>
This commit is contained in:
jsign
2020-01-14 21:24:08 -03:00
parent a8e39962d0
commit 08b99ff413
4 changed files with 49 additions and 15 deletions
+4
View File
@@ -83,6 +83,10 @@ func (a *ChainAPI) ChainGetBlockMessages(ctx context.Context, msg cid.Cid) (*api
}, nil
}
func (a *ChainAPI) ChainGetPath(ctx context.Context, from types.TipSetKey, to types.TipSetKey) ([]*store.HeadChange, error) {
return a.Chain.GetPath(ctx, from, to)
}
func (a *ChainAPI) ChainGetParentMessages(ctx context.Context, bcid cid.Cid) ([]api.Message, error) {
b, err := a.Chain.GetBlock(bcid)
if err != nil {