Use spec complaiant SealRandomnessLookback
This commit is contained in:
parent
237f8e8018
commit
ac98c8f451
@ -48,6 +48,9 @@ const ForkLengthThreshold = 100
|
|||||||
// Blocks (e)
|
// Blocks (e)
|
||||||
const BlocksPerEpoch = 1
|
const BlocksPerEpoch = 1
|
||||||
|
|
||||||
|
// Blocks
|
||||||
|
const Finality = 500
|
||||||
|
|
||||||
// /////
|
// /////
|
||||||
// Proofs
|
// Proofs
|
||||||
|
|
||||||
@ -65,6 +68,9 @@ const PoStChallangeTime = ProvingPeriodDuration - 5
|
|||||||
// Blocks
|
// Blocks
|
||||||
const PoStRandomnessLookback = 1
|
const PoStRandomnessLookback = 1
|
||||||
|
|
||||||
|
// Blocks
|
||||||
|
const SealRandomnessLookback = Finality
|
||||||
|
|
||||||
// /////
|
// /////
|
||||||
// Mining
|
// Mining
|
||||||
|
|
||||||
|
@ -171,7 +171,7 @@ func SealTicketGen(api api.FullNode) sector.TicketFn {
|
|||||||
return nil, xerrors.Errorf("getting head ts for SealTicket failed: %w", err)
|
return nil, xerrors.Errorf("getting head ts for SealTicket failed: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
r, err := api.ChainGetRandomness(ctx, ts, nil, build.RandomnessLookback)
|
r, err := api.ChainGetRandomness(ctx, ts, nil, build.SealRandomnessLookback)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, xerrors.Errorf("getting randomness for SealTicket failed: %w", err)
|
return nil, xerrors.Errorf("getting randomness for SealTicket failed: %w", err)
|
||||||
}
|
}
|
||||||
@ -182,7 +182,7 @@ func SealTicketGen(api api.FullNode) sector.TicketFn {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return §orbuilder.SealTicket{
|
return §orbuilder.SealTicket{
|
||||||
BlockHeight: ts.Height() - build.RandomnessLookback,
|
BlockHeight: ts.Height() - build.SealRandomnessLookback,
|
||||||
TicketBytes: tkt,
|
TicketBytes: tkt,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user