File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ use crate::wallets::WalletInfoWithProgress;
53
53
use crate :: {
54
54
calc_progress,
55
55
checker:: TxChecker ,
56
- client:: { BlockMeta , TxEntry } ,
56
+ client:: { BlockMeta , TxEntry , BlockchainInfo } ,
57
57
config:: ExtendedNetwork ,
58
58
deserialize_base64, serialize_base64,
59
59
source:: BitcoinRpc ,
@@ -72,6 +72,7 @@ pub struct ServerInfo {
72
72
pub network : String ,
73
73
pub tip : ChainAnchor ,
74
74
pub chain : ChainInfo ,
75
+ pub ready : bool ,
75
76
pub progress : f32 ,
76
77
}
77
78
@@ -1626,14 +1627,7 @@ async fn get_server_info(
1626
1627
rpc : & BitcoinRpc ,
1627
1628
tip : ChainAnchor ,
1628
1629
) -> anyhow:: Result < ServerInfo > {
1629
- #[ derive( Deserialize ) ]
1630
- struct Info {
1631
- pub chain : String ,
1632
- pub headers : u32 ,
1633
- pub blocks : u32 ,
1634
- }
1635
-
1636
- let info: Info = rpc
1630
+ let info: BlockchainInfo = rpc
1637
1631
. send_json ( client, & rpc. get_blockchain_info ( ) )
1638
1632
. await
1639
1633
. map_err ( |e| anyhow ! ( "Could not retrieve blockchain info ({})" , e) ) ?;
@@ -1653,6 +1647,7 @@ async fn get_server_info(
1653
1647
blocks : info. blocks ,
1654
1648
headers : info. headers ,
1655
1649
} ,
1650
+ ready : info. headers_synced . unwrap_or ( true ) ,
1656
1651
progress : calc_progress ( start_block, tip. height , info. headers ) ,
1657
1652
} )
1658
1653
}
You can’t perform that action at this time.
0 commit comments