Merge pull request #376 from filecoin-project/fix/statepower

Fix lotus state power
This commit is contained in:
Łukasz Magiera 2019-10-15 17:32:06 +02:00 committed by GitHub
commit 1f9b3755bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -70,14 +70,14 @@ func GetMinerOwner(ctx context.Context, sm *StateManager, st cid.Cid, maddr addr
func GetPower(ctx context.Context, sm *StateManager, ts *types.TipSet, maddr address.Address) (types.BigInt, types.BigInt, error) {
var err error
enc, err := actors.SerializeParams(&actors.PowerLookupParams{maddr})
if err != nil {
return types.EmptyInt, types.EmptyInt, err
}
var mpow types.BigInt
if maddr != address.Undef {
enc, aerr := actors.SerializeParams(&actors.PowerLookupParams{maddr})
if aerr != nil {
return types.EmptyInt, types.EmptyInt, aerr
}
ret, err := sm.Call(ctx, &types.Message{
From: maddr,
To: actors.StorageMarketAddress,