Merge pull request #2805 from filecoin-project/asr/import-fix

Fix import
This commit is contained in:
Łukasz Magiera 2020-08-04 14:37:08 +02:00 committed by GitHub
commit 6028b5b18f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -104,6 +104,16 @@ var importBenchCmd = &cli.Command{
return err
}
gb, err := cs.GetTipsetByHeight(context.TODO(), 0, head, true)
if err != nil {
return err
}
err = cs.SetGenesis(gb.Blocks()[0])
if err != nil {
return err
}
if h := cctx.Int64("height"); h != 0 {
tsh, err := cs.GetTipsetByHeight(context.TODO(), abi.ChainEpoch(h), head, true)
if err != nil {