disable call to StatePledgeCollateral
This commit is contained in:
parent
b245fd0b7d
commit
0dbca1377a
@ -176,17 +176,18 @@ func (ht *apiIpldStore) Put(ctx context.Context, v interface{}) (cid.Cid, error)
|
||||
}
|
||||
|
||||
func RecordTipsetStatePoints(ctx context.Context, api api.FullNode, pl *PointList, tipset *types.TipSet) error {
|
||||
pc, err := api.StatePledgeCollateral(ctx, tipset.Key())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
attoFil := types.NewInt(build.FilecoinPrecision).Int
|
||||
|
||||
pcFil := new(big.Rat).SetFrac(pc.Int, attoFil)
|
||||
pcFilFloat, _ := pcFil.Float64()
|
||||
p := NewPoint("chain.pledge_collateral", pcFilFloat)
|
||||
pl.AddPoint(p)
|
||||
//TODO: StatePledgeCollateral API is not implemented and is commented out - re-enable this block once the API is implemented again.
|
||||
//pc, err := api.StatePledgeCollateral(ctx, tipset.Key())
|
||||
//if err != nil {
|
||||
//return err
|
||||
//}
|
||||
|
||||
//pcFil := new(big.Rat).SetFrac(pc.Int, attoFil)
|
||||
//pcFilFloat, _ := pcFil.Float64()
|
||||
//p := NewPoint("chain.pledge_collateral", pcFilFloat)
|
||||
//pl.AddPoint(p)
|
||||
|
||||
netBal, err := api.WalletBalance(ctx, builtin.RewardActorAddr)
|
||||
if err != nil {
|
||||
@ -195,7 +196,7 @@ func RecordTipsetStatePoints(ctx context.Context, api api.FullNode, pl *PointLis
|
||||
|
||||
netBalFil := new(big.Rat).SetFrac(netBal.Int, attoFil)
|
||||
netBalFilFloat, _ := netBalFil.Float64()
|
||||
p = NewPoint("network.balance", netBalFilFloat)
|
||||
p := NewPoint("network.balance", netBalFilFloat)
|
||||
pl.AddPoint(p)
|
||||
|
||||
totalPower, err := api.StateMinerPower(ctx, address.Address{}, tipset.Key())
|
||||
|
Loading…
Reference in New Issue
Block a user