diff --git a/lgn-worker/src/main.rs b/lgn-worker/src/main.rs index 66ca180..5a2451d 100644 --- a/lgn-worker/src/main.rs +++ b/lgn-worker/src/main.rs @@ -28,6 +28,9 @@ use lgn_messages::types::UpstreamPayload; use lgn_worker::avs::utils::read_keystore; use metrics::counter; use mimalloc::MiMalloc; +use rand::distributions::Uniform; +use rand::prelude::Distribution; +use serde_json::Number; use tokio::io::AsyncWriteExt; use tokio_stream::StreamExt; use tonic::metadata::MetadataValue; @@ -622,6 +625,10 @@ fn get_claims(config: &Config) -> Result }; let version = env!("CARGO_PKG_VERSION"); + let price_range = Uniform::new( + 3000, + 5000, + ); let private = [ ( "version".to_string(), @@ -636,6 +643,10 @@ fn get_claims(config: &Config) -> Result .to_string(), ), ), + ( + "price".to_string(), + serde_json::Value::Number(Number::from(price_range.sample(&mut rand::thread_rng()))), + ), ] .into_iter() .collect::>();