clean up tests and fix cli commands
This commit is contained in:
@@ -425,12 +425,12 @@ func (a *StateAPI) MsigGetAvailableBalance(ctx context.Context, addr address.Add
|
||||
return act.Balance, nil
|
||||
}
|
||||
|
||||
offset := ts.Height() - st.StartingBlock
|
||||
if offset > st.UnlockDuration {
|
||||
offset := ts.Height() - uint64(st.StartEpoch)
|
||||
if offset > uint64(st.UnlockDuration) {
|
||||
return act.Balance, nil
|
||||
}
|
||||
|
||||
minBalance := types.BigDiv(st.InitialBalance, types.NewInt(st.UnlockDuration))
|
||||
minBalance := types.BigDiv(types.BigInt(st.InitialBalance), types.NewInt(uint64(st.UnlockDuration)))
|
||||
minBalance = types.BigMul(minBalance, types.NewInt(offset))
|
||||
return types.BigSub(act.Balance, minBalance), nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user