Gate runtime's GetRandomnessFromBeacon on HyperdriveHeight, not network version
This commit is contained in:
parent
c5797482b2
commit
a41a1cbd93
@ -229,7 +229,7 @@ func (rt *Runtime) GetRandomnessFromTickets(personalization crypto.DomainSeparat
|
||||
func (rt *Runtime) GetRandomnessFromBeacon(personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte) abi.Randomness {
|
||||
var err error
|
||||
var res []byte
|
||||
if rt.vm.GetNtwkVersion(rt.ctx, randEpoch) >= network.Version13 {
|
||||
if randEpoch > build.UpgradeHyperdriveHeight {
|
||||
res, err = rt.vm.rand.GetBeaconRandomnessLookingForward(rt.ctx, personalization, randEpoch, entropy)
|
||||
} else {
|
||||
res, err = rt.vm.rand.GetBeaconRandomnessLookingBack(rt.ctx, personalization, randEpoch, entropy)
|
||||
|
Loading…
Reference in New Issue
Block a user