Add TipSetKey as a concatenation of block CIDs, and use if for ChainGetTipSet, ChainGetRandomness.

This commit is contained in:
anorth
2019-11-13 15:23:37 +11:00
parent 745df10bec
commit 84a4766d8f
12 changed files with 220 additions and 29 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, nil, build.SealRandomnessLookback)
r, err := api.ChainGetRandomness(ctx, ts.Key(), nil, build.SealRandomnessLookback)
if err != nil {
return nil, xerrors.Errorf("getting randomness for SealTicket failed: %w", err)
}