You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In queries, env.block.random returns a Vec<u8>[0] (a byte array with a single byte which is zero).
If randomness in queries is unsupported (which it appears it is), I think this behavior is dangerous and can lead to someone unknowing using the query block "random" as an actual random, when it is not random at all.
It would make much more sense to just return None in this case to completely avoid misuse.
The text was updated successfully, but these errors were encountered:
In queries,
env.block.random
returns aVec<u8>[0]
(a byte array with a single byte which is zero).If randomness in queries is unsupported (which it appears it is), I think this behavior is dangerous and can lead to someone unknowing using the query block "random" as an actual random, when it is not random at all.
It would make much more sense to just return
None
in this case to completely avoid misuse.The text was updated successfully, but these errors were encountered: