From 1b992c6982c1e659a3f6219933121c590f8e720e Mon Sep 17 00:00:00 2001 From: DecentralizedDev <181214587+DecentralizedDev@users.noreply.github.com> Date: Sat, 5 Apr 2025 13:46:44 +0200 Subject: [PATCH 1/2] backend getter added again --- crates/src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/src/lib.rs b/crates/src/lib.rs index bd5dfd2..f3373f9 100644 --- a/crates/src/lib.rs +++ b/crates/src/lib.rs @@ -711,6 +711,12 @@ impl DriftClient { pub fn oracle_map(&self) -> Arc> { self.backend.oracle_map.map() } + + /// Return a reference to the internal backend + #[cfg(feature = "unsafe_pub")] + pub fn backend(&self) -> &'static DriftClientBackend { + self.backend + } } /// Provides the heavy-lifting and network facing features of the SDK From fa193f3b3e2d8d44170db66f028d4c89d093b1ec Mon Sep 17 00:00:00 2001 From: DecentralizedDev <181214587+DecentralizedDev@users.noreply.github.com> Date: Sun, 6 Apr 2025 15:28:03 +0200 Subject: [PATCH 2/2] Made marketmap pub --- crates/src/marketmap.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/src/marketmap.rs b/crates/src/marketmap.rs index 8cc98a1..1125cfa 100644 --- a/crates/src/marketmap.rs +++ b/crates/src/marketmap.rs @@ -75,7 +75,7 @@ impl Market for SpotMarket { /// Caller can subscribe to updates via Ws with `.subscribe(..)` /// or drive the map by calling `.sync()` periodically pub struct MarketMap { - marketmap: Arc, ahash::RandomState>>, + pub marketmap: Arc, ahash::RandomState>>, subscriptions: DashMap, latest_slot: Arc, pubsub: Arc,