don't resolve the worker key twice
This commit is contained in:
parent
b05613445e
commit
59cfabf8a4
@ -467,17 +467,12 @@ func (m *Miner) computeTicket(ctx context.Context, brand *types.BeaconEntry, bas
|
|||||||
buf.Write(base.TipSet.MinTicket().VRFProof)
|
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())
|
input, err := store.DrawRandomness(brand.Data, crypto.DomainSeparationTag_TicketProduction, round-build.TicketRandomnessLookback, buf.Bytes())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
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 {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user