don't resolve the worker key twice

This commit is contained in:
Steven Allen 2020-10-22 15:48:09 -07:00
parent b05613445e
commit 59cfabf8a4

View File

@ -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
}