Refactor mining logic to match specs ticket chain

This commit is contained in:
whyrusleeping
2019-11-20 10:52:36 -06:00
parent d680dab52e
commit f8eabd3db4
26 changed files with 166 additions and 216 deletions
+1 -1
View File
@@ -221,7 +221,7 @@ func SealTicketGen(api api.FullNode) storage.TicketFn {
return nil, xerrors.Errorf("getting head ts for SealTicket failed: %w", err)
}
r, err := api.ChainGetRandomness(ctx, ts.Key(), nil, build.SealRandomnessLookback)
r, err := api.ChainGetRandomness(ctx, ts.Key(), int64(ts.Height())-build.SealRandomnessLookback)
if err != nil {
return nil, xerrors.Errorf("getting randomness for SealTicket failed: %w", err)
}