@@ -11,8 +11,8 @@ use crate::error::SyncerError;
1111use crate :: syncerd:: opts:: Opts ;
1212use crate :: syncerd:: runtime:: SyncerdTask ;
1313use crate :: syncerd:: runtime:: Synclet ;
14- use crate :: syncerd:: syncer_state:: AddressTx ;
15- use crate :: syncerd:: syncer_state:: SyncerState ;
14+ use crate :: syncerd:: syncer_state:: { AddressTx , BalanceServiceIdPair , TransactionServiceIdPair } ;
15+ use crate :: syncerd:: syncer_state:: { GetTxServiceIdPair , SyncerState } ;
1616use crate :: syncerd:: types:: { AddressAddendum , Boolean , SweepAddressAddendum , Task } ;
1717use crate :: syncerd:: BtcAddressAddendum ;
1818use crate :: syncerd:: Event ;
@@ -48,7 +48,7 @@ use tokio::sync::mpsc::Sender as TokioSender;
4848use tokio:: sync:: Mutex ;
4949
5050use super :: HealthCheck ;
51- use super :: { GetAddressBalance , TxFilter , Txid } ;
51+ use super :: { TxFilter , Txid } ;
5252
5353const RETRY_TIMEOUT : u64 = 5 ;
5454const PING_WAIT : u8 = 2 ;
@@ -614,7 +614,7 @@ async fn run_syncerd_task_receiver(
614614 state : Arc < Mutex < SyncerState > > ,
615615 transaction_broadcast_tx : TokioSender < ( BroadcastTransaction , ServiceId ) > ,
616616 transaction_get_tx : TokioSender < ( GetTx , ServiceId ) > ,
617- balance_get_tx : TokioSender < ( GetAddressBalance , ServiceId ) > ,
617+ balance_get_tx : TokioSender < BalanceServiceIdPair > ,
618618 terminate_tx : TokioSender < ( ) > ,
619619) {
620620 tokio:: spawn ( async move {
@@ -1154,7 +1154,7 @@ fn sweep_polling(
11541154fn transaction_fetcher (
11551155 electrum_server : String ,
11561156 proxy_address : Option < String > ,
1157- mut transaction_get_rx : TokioReceiver < ( GetTx , ServiceId ) > ,
1157+ mut transaction_get_rx : TokioReceiver < GetTxServiceIdPair > ,
11581158 tx_event : TokioSender < BridgeEvent > ,
11591159) -> tokio:: task:: JoinHandle < ( ) > {
11601160 tokio:: task:: spawn ( async move {
@@ -1207,7 +1207,7 @@ fn transaction_fetcher(
12071207fn balance_fetcher (
12081208 electrum_server : String ,
12091209 proxy_address : Option < String > ,
1210- mut balance_get_rx : TokioReceiver < ( GetAddressBalance , ServiceId ) > ,
1210+ mut balance_get_rx : TokioReceiver < BalanceServiceIdPair > ,
12111211 tx_event : TokioSender < BridgeEvent > ,
12121212) -> tokio:: task:: JoinHandle < ( ) > {
12131213 tokio:: task:: spawn ( async move {
@@ -1320,16 +1320,16 @@ impl Synclet for BitcoinSyncer {
13201320 TokioReceiver < BridgeEvent > ,
13211321 ) = tokio:: sync:: mpsc:: channel ( 200 ) ;
13221322 let ( transaction_broadcast_tx, transaction_broadcast_rx) : (
1323- TokioSender < ( BroadcastTransaction , ServiceId ) > ,
1324- TokioReceiver < ( BroadcastTransaction , ServiceId ) > ,
1323+ TokioSender < TransactionServiceIdPair > ,
1324+ TokioReceiver < TransactionServiceIdPair > ,
13251325 ) = tokio:: sync:: mpsc:: channel ( 200 ) ;
13261326 let ( transaction_get_tx, transaction_get_rx) : (
1327- TokioSender < ( GetTx , ServiceId ) > ,
1328- TokioReceiver < ( GetTx , ServiceId ) > ,
1327+ TokioSender < GetTxServiceIdPair > ,
1328+ TokioReceiver < GetTxServiceIdPair > ,
13291329 ) = tokio:: sync:: mpsc:: channel ( 200 ) ;
13301330 let ( balance_get_tx, balance_get_rx) : (
1331- TokioSender < ( GetAddressBalance , ServiceId ) > ,
1332- TokioReceiver < ( GetAddressBalance , ServiceId ) > ,
1331+ TokioSender < BalanceServiceIdPair > ,
1332+ TokioReceiver < BalanceServiceIdPair > ,
13331333 ) = tokio:: sync:: mpsc:: channel ( 200 ) ;
13341334 let ( terminate_tx, terminate_rx) : ( TokioSender < ( ) > , TokioReceiver < ( ) > ) =
13351335 tokio:: sync:: mpsc:: channel ( 1 ) ;
0 commit comments