Merge pull request #1947 from filecoin-project/asr/mineravailablebalance

Correct double-counting in StateMinerAvailableBalance
This commit is contained in:
Łukasz Magiera 2020-06-08 13:24:54 +02:00 committed by GitHub
commit 5270c20263
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -794,9 +794,7 @@ func (a *StateAPI) StateMinerAvailableBalance(ctx context.Context, maddr address
return types.EmptyInt, err
}
// TODO: !!!! Use method that doesnt trigger additional state mutations, this is going to cause lots of objects to be created and written to disk
log.Warnf("calling inefficient unlock vested funds method, fixme")
vested, err := st.UnlockVestedFunds(as, ts.Height())
vested, err := st.CheckVestedFunds(as, ts.Height())
if err != nil {
return types.EmptyInt, err
}