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
+4 -4
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,