Skip to content
Snippets Groups Projects
Commit 269c1bbf authored by capossele's avatar capossele
Browse files

:lock: adds check on round and instance ID

parent b7ddf59a
No related branches found
No related tags found
No related merge requests found
......@@ -52,6 +52,14 @@ func VerifyCollectiveBeacon(state *state.State, data *events.CollectiveBeaconEve
return errors.New("Distributed Public Key does not match")
}
if data.Round <= state.Randomness().Round {
return errors.New("invalid Round")
}
if data.InstanceID != state.Committee().InstanceID {
return errors.New("invalid instanceID")
}
if err := verifySignature(data); err != nil {
return err
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment