From 741825a04ee11b5ef68f32a7aee3608fca99911e Mon Sep 17 00:00:00 2001 From: Aayush Rajasekaran Date: Sun, 7 Jun 2020 20:46:19 -0400 Subject: [PATCH] Correct double-counting in StateMinerAvailableBalance --- node/impl/full/state.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/node/impl/full/state.go b/node/impl/full/state.go index 546434d8c..d64c240f1 100644 --- a/node/impl/full/state.go +++ b/node/impl/full/state.go @@ -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 }