From 8e5814c6833e108424ebb468eb34b471fb1dae0d Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 8 Jun 2023 16:29:24 +0100 Subject: [PATCH] tor-hsclient: Call the mock with the result circuit --- crates/tor-hsclient/src/connect.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/tor-hsclient/src/connect.rs b/crates/tor-hsclient/src/connect.rs index 2e58b8fb3..6b8726ad0 100644 --- a/crates/tor-hsclient/src/connect.rs +++ b/crates/tor-hsclient/src/connect.rs @@ -255,6 +255,7 @@ impl<'c, R: Runtime, M: MocksForConnect> Context<'c, R, M> { mocks.test_got_desc(desc); let circ = self.intro_rend_connect(desc, &mut data.ipts).await?; + mocks.test_got_circ(&circ); Ok(circ) } @@ -730,6 +731,10 @@ trait MocksForConnect: Clone { fn test_got_desc(&self, desc: &HsDesc) { eprintln!("HS DESC:\n{:?}\n", &desc); // TODO HS remove } + /// Tell tests we got this circuit + fn test_got_circ(&self, circ: &Arc) { + eprintln!("HS CIRC:\n{:?}\n", &circ); // TODO HS remove + } /// Return a random number generator fn thread_rng(&self) -> Self::Rng;