This commit is contained in:
Łukasz Magiera 2020-08-01 09:40:25 +02:00
parent e5ca4b22d5
commit 90baf06011
3 changed files with 3 additions and 4 deletions

View File

@ -978,4 +978,3 @@ var chainGasPriceCmd = &cli.Command{
return nil
},
}

View File

@ -70,7 +70,7 @@ type API struct {
Imports dtypes.ClientImportMgr
CombinedBstore dtypes.ClientBlockstore // TODO: try to remove
CombinedBstore dtypes.ClientBlockstore // TODO: try to remove
RetrievalStoreMgr dtypes.ClientRetrievalStoreManager
}

View File

@ -42,12 +42,12 @@ func (a *GasAPI) GasEstimateGasPrice(ctx context.Context, nblocksincl uint64,
var blocks int
ts := a.Chain.GetHeaviestTipSet()
for i := uint64(0); i < nblocksincl * 2; i++ {
for i := uint64(0); i < nblocksincl*2; i++ {
if len(ts.Parents().Cids()) == 0 {
break // genesis
}
pts, err := a.Chain.LoadTipSet(ts.Parents())
pts, err := a.Chain.LoadTipSet(ts.Parents())
if err != nil {
return types.BigInt{}, err
}