From c3c6fda9d58b157c69e2cc42c2620b15c3d9317e Mon Sep 17 00:00:00 2001 From: austinabell Date: Mon, 17 Aug 2020 09:32:47 -0400 Subject: [PATCH] Remove unnecessary miner state load for checking slashed --- chain/stmgr/utils.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/chain/stmgr/utils.go b/chain/stmgr/utils.go index 8c9cfc792..1474829a2 100644 --- a/chain/stmgr/utils.go +++ b/chain/stmgr/utils.go @@ -272,14 +272,8 @@ func StateMinerInfo(ctx context.Context, sm *StateManager, ts *types.TipSet, mad } func GetMinerSlashed(ctx context.Context, sm *StateManager, ts *types.TipSet, maddr address.Address) (bool, error) { - var mas miner.State - _, err := sm.LoadActorState(ctx, maddr, &mas, ts) - if err != nil { - return false, xerrors.Errorf("(get miner slashed) failed to load miner actor state") - } - var spas power.State - _, err = sm.LoadActorState(ctx, builtin.StoragePowerActorAddr, &spas, ts) + _, err := sm.LoadActorState(ctx, builtin.StoragePowerActorAddr, &spas, ts) if err != nil { return false, xerrors.Errorf("(get miner slashed) failed to load power actor state") }