@@ -16,7 +16,9 @@ use lightning_block_sync::http::{HttpEndpoint, JsonResponse};
1616use lightning_block_sync:: poll:: ValidatedBlockHeader ;
1717use lightning_block_sync:: rest:: RestClient ;
1818use lightning_block_sync:: rpc:: { RpcClient , RpcError } ;
19- use lightning_block_sync:: { BlockSource , Cache } ;
19+ use lightning_block_sync:: {
20+ AsyncBlockSourceResult , BlockData , BlockHeaderData , BlockSource , Cache ,
21+ } ;
2022
2123use serde:: Serialize ;
2224
@@ -573,7 +575,7 @@ impl BitcoindClient {
573575impl BlockSource for BitcoindClient {
574576 fn get_header < ' a > (
575577 & ' a self , header_hash : & ' a bitcoin:: BlockHash , height_hint : Option < u32 > ,
576- ) -> lightning_block_sync :: AsyncBlockSourceResult < ' a , lightning_block_sync :: BlockHeaderData > {
578+ ) -> AsyncBlockSourceResult < ' a , BlockHeaderData > {
577579 match self {
578580 BitcoindClient :: Rpc { rpc_client, .. } => {
579581 Box :: pin ( async move { rpc_client. get_header ( header_hash, height_hint) . await } )
@@ -586,7 +588,7 @@ impl BlockSource for BitcoindClient {
586588
587589 fn get_block < ' a > (
588590 & ' a self , header_hash : & ' a bitcoin:: BlockHash ,
589- ) -> lightning_block_sync :: AsyncBlockSourceResult < ' a , lightning_block_sync :: BlockData > {
591+ ) -> AsyncBlockSourceResult < ' a , BlockData > {
590592 match self {
591593 BitcoindClient :: Rpc { rpc_client, .. } => {
592594 Box :: pin ( async move { rpc_client. get_block ( header_hash) . await } )
@@ -597,9 +599,7 @@ impl BlockSource for BitcoindClient {
597599 }
598600 }
599601
600- fn get_best_block (
601- & self ,
602- ) -> lightning_block_sync:: AsyncBlockSourceResult < ( bitcoin:: BlockHash , Option < u32 > ) > {
602+ fn get_best_block ( & self ) -> AsyncBlockSourceResult < ( bitcoin:: BlockHash , Option < u32 > ) > {
603603 match self {
604604 BitcoindClient :: Rpc { rpc_client, .. } => {
605605 Box :: pin ( async move { rpc_client. get_best_block ( ) . await } )
0 commit comments