Skip to content

Commit

Permalink
don't resolve the worker key twice
Browse files Browse the repository at this point in the history
  • Loading branch information
Stebalien committed Oct 22, 2020
1 parent b056134 commit 59cfabf
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions miner/miner.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 59cfabf

Please sign in to comment.