aboutsummaryrefslogtreecommitdiff
path: root/core/src/util
diff options
context:
space:
mode:
authorhozan23 <hozan23@karyontech.net>2024-05-23 00:19:58 +0200
committerhozan23 <hozan23@karyontech.net>2024-05-23 00:19:58 +0200
commit2d1a8aea0b9330cd2eaad26eb187644adad6bed9 (patch)
tree6083adaa09ae2f0ef2912f7934cdf0bfafff1654 /core/src/util
parentcc1d61c401e52ba3b6cd264c5400fb7ab52522dc (diff)
jsonrpc: spawn task when handle new request
Diffstat (limited to 'core/src/util')
-rw-r--r--core/src/util/mod.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/src/util/mod.rs b/core/src/util/mod.rs
index a3c3f50..ec59e1c 100644
--- a/core/src/util/mod.rs
+++ b/core/src/util/mod.rs
@@ -13,6 +13,11 @@ pub fn random_32() -> u32 {
OsRng.gen()
}
+/// Generates and returns a random u64 using `rand::rngs::OsRng`.
+pub fn random_64() -> u64 {
+ OsRng.gen()
+}
+
/// Generates and returns a random u16 using `rand::rngs::OsRng`.
pub fn random_16() -> u16 {
OsRng.gen()