From 59cfabf8a4496716c79a3f449c33019964473e13 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Thu, 22 Oct 2020 15:48:09 -0700 Subject: [PATCH] don't resolve the worker key twice --- miner/miner.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/miner/miner.go b/miner/miner.go index 7916e0405..7de7f5b73 100644 --- a/miner/miner.go +++ b/miner/miner.go @@ -467,17 +467,12 @@ func (m *Miner) computeTicket(ctx context.Context, brand *types.BeaconEntry, bas buf.Write(base.TipSet.MinTicket().VRFProof) } - worker, err := m.api.StateAccountKey(ctx, mbi.WorkerKey, types.EmptyTSK) - if err != nil { - return nil, err - } - input, err := store.DrawRandomness(brand.Data, crypto.DomainSeparationTag_TicketProduction, round-build.TicketRandomnessLookback, buf.Bytes()) if err != nil { return nil, err } - vrfOut, err := gen.ComputeVRF(ctx, m.api.WalletSign, worker, input) + vrfOut, err := gen.ComputeVRF(ctx, m.api.WalletSign, mbi.WorkerKey, input) if err != nil { return nil, err }