diff --git a/darkside-tests/src/chain_generics.rs b/darkside-tests/src/chain_generics.rs index 6324b9194..901284ce9 100644 --- a/darkside-tests/src/chain_generics.rs +++ b/darkside-tests/src/chain_generics.rs @@ -61,7 +61,7 @@ pub(crate) mod conduct_chain { elf } - fn lightserver_uri() -> Option { + fn lightserver_uri(&self) -> Option { Some(self.client_builder.server_id.clone()) } @@ -87,10 +87,11 @@ pub(crate) mod conduct_chain { } async fn bump_chain(&mut self) { - let height_before = zingolib::grpc_connector::get_latest_block(self.lightserver_uri()) - .await - .unwrap() - .height; + let height_before = + zingolib::grpc_connector::get_latest_block(self.lightserver_uri().unwrap()) + .await + .unwrap() + .height; let blocks_to_add = 1; diff --git a/zingolib/src/lightclient/send.rs b/zingolib/src/lightclient/send.rs index 18b4c94a0..05eb5ce88 100644 --- a/zingolib/src/lightclient/send.rs +++ b/zingolib/src/lightclient/send.rs @@ -238,7 +238,7 @@ pub mod send_with_proposal { match crate::utils::conversion::txid_from_hex_encoded_str( serverz_txid_string.as_str(), ) { - Ok(reported_txid) => { + Ok(_reported_txid) => { // happens during darkside tests // If this option is enabled, the LightClient will replace outgoing TxId records with the TxId picked by the server. necessary for darkside. // #[cfg(feature = "darkside_tests")] diff --git a/zingolib/src/testutils/chain_generics/conduct_chain.rs b/zingolib/src/testutils/chain_generics/conduct_chain.rs index 924168e65..36d9dbe5f 100644 --- a/zingolib/src/testutils/chain_generics/conduct_chain.rs +++ b/zingolib/src/testutils/chain_generics/conduct_chain.rs @@ -17,7 +17,7 @@ pub trait ConductChain { async fn setup() -> Self; /// used to connect to server via grpc - fn lightserver_uri() -> Option; + fn lightserver_uri(&self) -> Option; /// builds a faucet (funded from mining) async fn create_faucet(&mut self) -> LightClient; diff --git a/zingolib/src/testutils/chain_generics/libtonode.rs b/zingolib/src/testutils/chain_generics/libtonode.rs index 375347795..e033a374a 100644 --- a/zingolib/src/testutils/chain_generics/libtonode.rs +++ b/zingolib/src/testutils/chain_generics/libtonode.rs @@ -66,4 +66,8 @@ impl ConductChain for LibtonodeEnvironment { start_height + 1 ); } + + fn lightserver_uri(&self) -> Option { + todo!() + } } diff --git a/zingolib/src/testutils/chain_generics/live_chain.rs b/zingolib/src/testutils/chain_generics/live_chain.rs index 9dccb34c3..08b17e5b5 100644 --- a/zingolib/src/testutils/chain_generics/live_chain.rs +++ b/zingolib/src/testutils/chain_generics/live_chain.rs @@ -25,4 +25,8 @@ impl ConductChain for LiveChain { // average block time is 75 seconds. we do this twice here to insist on a new block tokio::time::sleep(std::time::Duration::from_secs(150)).await; } + + fn lightserver_uri(&self) -> Option { + todo!() + } } diff --git a/zingolib/src/testutils/chain_generics/with_assertions.rs b/zingolib/src/testutils/chain_generics/with_assertions.rs index 09afdb7b9..3f12f0c52 100644 --- a/zingolib/src/testutils/chain_generics/with_assertions.rs +++ b/zingolib/src/testutils/chain_generics/with_assertions.rs @@ -77,10 +77,12 @@ where .expect("record is ok"); dbg!( - crate::grpc_connector::get_latest_block(sender.config.lightwalletd_uri.read().unwrap()) - .await - .unwrap() - .height + crate::grpc_connector::get_latest_block( + sender.config.lightwalletd_uri.read().unwrap().to_owned() + ) + .await + .unwrap() + .height ); lookup_statuses(sender, txids.clone()).await.map(|status| {