From 2d1a8aea0b9330cd2eaad26eb187644adad6bed9 Mon Sep 17 00:00:00 2001 From: hozan23 Date: Thu, 23 May 2024 00:19:58 +0200 Subject: jsonrpc: spawn task when handle new request --- core/src/util/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'core/src/util') 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() -- cgit v1.2.3