mirror of
https://github.com/logos-messaging/logos-messaging-rust-bindings.git
synced 2026-01-05 15:33:07 +00:00
use uuid instead of hard-coded request id in store query
This commit is contained in:
parent
14aa84f04e
commit
eb4286ba71
4
Cargo.lock
generated
4
Cargo.lock
generated
@ -3048,6 +3048,9 @@ name = "uuid"
|
|||||||
version = "1.7.0"
|
version = "1.7.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a"
|
checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a"
|
||||||
|
dependencies = [
|
||||||
|
"getrandom",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "valuable"
|
name = "valuable"
|
||||||
@ -3086,6 +3089,7 @@ dependencies = [
|
|||||||
"sscanf",
|
"sscanf",
|
||||||
"tokio",
|
"tokio",
|
||||||
"url",
|
"url",
|
||||||
|
"uuid",
|
||||||
"waku-sys",
|
"waku-sys",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
4
examples/Cargo.lock
generated
4
examples/Cargo.lock
generated
@ -4915,6 +4915,9 @@ name = "uuid"
|
|||||||
version = "1.11.0"
|
version = "1.11.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a"
|
checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a"
|
||||||
|
dependencies = [
|
||||||
|
"getrandom",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "valuable"
|
name = "valuable"
|
||||||
@ -4963,6 +4966,7 @@ dependencies = [
|
|||||||
"sscanf",
|
"sscanf",
|
||||||
"tokio",
|
"tokio",
|
||||||
"url",
|
"url",
|
||||||
|
"uuid",
|
||||||
"waku-sys",
|
"waku-sys",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@ -34,6 +34,7 @@ rln = "0.3.4"
|
|||||||
tokio = { version = "1", features = ["full"] }
|
tokio = { version = "1", features = ["full"] }
|
||||||
regex = "1"
|
regex = "1"
|
||||||
chrono = "0.4"
|
chrono = "0.4"
|
||||||
|
uuid = { version = "1.3", features = ["v4"] }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
futures = "0.3.25"
|
futures = "0.3.25"
|
||||||
|
|||||||
@ -18,6 +18,7 @@ pub use secp256k1::{PublicKey, SecretKey};
|
|||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
use store::StoreWakuMessageResponse;
|
use store::StoreWakuMessageResponse;
|
||||||
|
use uuid::Uuid;
|
||||||
// internal
|
// internal
|
||||||
use crate::general::contenttopic::{Encoding, WakuContentTopic};
|
use crate::general::contenttopic::{Encoding, WakuContentTopic};
|
||||||
use crate::general::libwaku_response::LibwakuResponse;
|
use crate::general::libwaku_response::LibwakuResponse;
|
||||||
@ -202,10 +203,11 @@ impl WakuNodeHandle<Running> {
|
|||||||
let mut messages: Vec<StoreWakuMessageResponse> = Vec::new();
|
let mut messages: Vec<StoreWakuMessageResponse> = Vec::new();
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
|
let request_id = Uuid::new_v4();
|
||||||
let response = store::waku_store_query(
|
let response = store::waku_store_query(
|
||||||
&self.ctx,
|
&self.ctx,
|
||||||
"hard-coded-req-id".to_string(),
|
|
||||||
true, // include_data
|
true, // include_data
|
||||||
|
request_id.to_string(),
|
||||||
pubsub_topic.clone(),
|
pubsub_topic.clone(),
|
||||||
content_topics.clone(),
|
content_topics.clone(),
|
||||||
Some(time_start), // time_start
|
Some(time_start), // time_start
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user