Sfoglia il codice sorgente

Reduce lazer rust client memory usage (#3059)

Dani Mehrjerdi 2 mesi fa
parent
commit
8bf84db01f

+ 1 - 1
Cargo.lock

@@ -5693,7 +5693,7 @@ dependencies = [
 
 [[package]]
 name = "pyth-lazer-client"
-version = "8.0.0"
+version = "8.0.1"
 dependencies = [
  "alloy-primitives 0.8.25",
  "anyhow",

+ 1 - 1
lazer/sdk/rust/client/Cargo.toml

@@ -1,6 +1,6 @@
 [package]
 name = "pyth-lazer-client"
-version = "8.0.0"
+version = "8.0.1"
 edition = "2021"
 description = "A Rust client for Pyth Lazer"
 license = "Apache-2.0"

+ 1 - 1
lazer/sdk/rust/client/src/stream_client.rs

@@ -183,7 +183,7 @@ impl PythLazerStreamClient {
                 if seen_updates.contains_key(&cache_key) {
                     continue;
                 }
-                seen_updates.insert(cache_key, response.clone(), DEDUP_TTL);
+                seen_updates.insert(cache_key, true, DEDUP_TTL);
 
                 match sender.try_send(response) {
                     Ok(_) => (),