Merge pull request #2468 from filecoin-project/fix/initial-pledge-api

fix StateMinerInitialPledgeCollateral
This commit is contained in:
Łukasz Magiera 2020-07-18 21:22:38 +02:00 committed by GitHub
commit 65f509db40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -956,7 +956,7 @@ func (a *StateAPI) StateMinerInitialPledgeCollateral(ctx context.Context, maddr
}
sectorWeight := miner.QAPowerForWeight(ssize, duration, dealWeights.DealWeight, dealWeights.VerifiedDealWeight)
initialPledge := miner.InitialPledgeForPower(sectorWeight, powerState.TotalQualityAdjPower, powerState.TotalPledgeCollateral, reward.BaselinePowerAt(ts.Height()), rewardState.ThisEpochReward, circSupply)
initialPledge := miner.InitialPledgeForPower(sectorWeight, powerState.TotalQualityAdjPower, reward.BaselinePowerAt(ts.Height()), powerState.TotalPledgeCollateral, rewardState.ThisEpochReward, circSupply)
return types.BigDiv(types.BigMul(initialPledge, initialPledgeNum), initialPledgeDen), nil
}