handle sourcing randomness from a future block

This commit is contained in:
Jeromy 2020-06-03 18:30:43 -07:00
parent 2fdcf5347b
commit cd817906b2

View File

@ -914,6 +914,10 @@ func (cs *ChainStore) GetRandomness(ctx context.Context, blks []cid.Cid, pers cr
return nil, err
}
if round > ts.Height() {
return DrawRandomness(ts.MinTicket().VRFProof, pers, round, entropy)
}
searchHeight := round
if searchHeight < 0 {
searchHeight = 0