From 4e2c7f677f3aa75c1dfbb255831bc9b41a3ba296 Mon Sep 17 00:00:00 2001 From: ghassmo Date: Fri, 7 Jan 2022 17:49:42 +0400 Subject: [PATCH] service/btc: print the main address when run cashierd --- src/service/btc.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/service/btc.rs b/src/service/btc.rs index 4f7ff6672..a751684c6 100644 --- a/src/service/btc.rs +++ b/src/service/btc.rs @@ -323,9 +323,6 @@ pub struct BtcClient { } impl BtcClient { pub async fn new(main_keypair: Keypair, network: &str) -> Result> { - //TODO - // info!(target: "SOL BRIDGE", "Main BTC wallet pubkey: {:?}", &main_keypair.pubkey()); - let notify_channel = async_channel::unbounded(); let (network, url) = match network { @@ -336,6 +333,8 @@ impl BtcClient { let main_account = Account::new(&main_keypair, network); + info!(target: "BTC BRIDGE", "Main BTC Address: {}", main_account.address.to_string()); + Ok(Arc::new(Self { main_account, client: Arc::new(Mutex::new(Client::new(url)?)), @@ -552,9 +551,11 @@ impl NetworkClient for BtcClient { Ok(public_key) } + async fn get_notifier(self: Arc) -> Result> { Ok(self.notify_channel.1.clone()) } + async fn send( self: Arc, address: Vec,