Skip to content

Commit c8049a0

Browse files
committed
mid debugging height difference error
1 parent f40ddb5 commit c8049a0

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

darkside-tests/src/chain_generics.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ pub(crate) mod conduct_chain {
6161
elf
6262
}
6363

64+
fn lightserver_uri() -> Option<Uri> {
65+
Some(self.client_builder.server_id.clone())
66+
}
67+
6468
async fn create_faucet(&mut self) -> LightClient {
6569
self.stage_transaction(ABANDON_TO_DARKSIDE_SAP_10_000_000_ZAT)
6670
.await;
@@ -83,11 +87,10 @@ pub(crate) mod conduct_chain {
8387
}
8488

8589
async fn bump_chain(&mut self) {
86-
let height_before =
87-
zingolib::grpc_connector::get_latest_block(self.client_builder.server_id.clone())
88-
.await
89-
.unwrap()
90-
.height;
90+
let height_before = zingolib::grpc_connector::get_latest_block(self.lightserver_uri())
91+
.await
92+
.unwrap()
93+
.height;
9194

9295
let blocks_to_add = 1;
9396

zingolib/src/testutils/chain_generics/conduct_chain.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ use crate::{lightclient::LightClient, wallet::LightWallet};
1515
pub trait ConductChain {
1616
/// set up the test chain
1717
async fn setup() -> Self;
18+
19+
/// used to connect to server via grpc
20+
fn lightserver_uri() -> Option<Uri>;
21+
1822
/// builds a faucet (funded from mining)
1923
async fn create_faucet(&mut self) -> LightClient;
2024

zingolib/src/testutils/chain_generics/with_assertions.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,13 @@ where
7676
.as_ref()
7777
.expect("record is ok");
7878

79+
dbg!(
80+
crate::grpc_connector::get_latest_block(sender.config.lightwalletd_uri.read().unwrap())
81+
.await
82+
.unwrap()
83+
.height
84+
);
85+
7986
lookup_statuses(sender, txids.clone()).await.map(|status| {
8087
assert_eq!(
8188
status,

0 commit comments

Comments
 (0)