Merge pull request #3850 from filecoin-project/asr/msig-avail

Fix MsigGetAvailableBalance
This commit is contained in:
Łukasz Magiera 2020-09-15 10:22:27 +02:00 committed by GitHub
commit 1c02a417db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -883,9 +883,8 @@ func (a *StateAPI) MsigGetAvailableBalance(ctx context.Context, addr address.Add
return act.Balance, nil
}
minBalance := types.BigDiv(st.InitialBalance, types.NewInt(uint64(st.UnlockDuration)))
minBalance = types.BigMul(minBalance, types.NewInt(uint64(offset)))
return types.BigSub(act.Balance, minBalance), nil
al := st.AmountLocked(offset)
return types.BigSub(act.Balance, al), nil
}
func (a *StateAPI) MsigGetVested(ctx context.Context, addr address.Address, start types.TipSetKey, end types.TipSetKey) (types.BigInt, error) {