} } #[derive(Serialize)] pub(crate) struct Info { blocks_indexed: u32, branch_pages: u64, fragmented_bytes: u64, index_file_size: u64, index_path: PathBuf, leaf_pages: u64, metadata_bytes: u64, outputs_traversed: u64, page_size: usize, sat_ranges: u64, stored_bytes: u64, tables: BTreeMap, pub(crate) transactions: Vec, tree_height: u32, utxos_indexed: u64, } #[derive(Serialize)] pub(crate) struct TableInfo { branch_pages: u64, fragmented_bytes: u64, leaf_pages: u64, metadata_bytes: u64, stored_bytes: u64, tree_height: u32, } #[derive(Serialize)] pub(crate) struct TransactionInfo { pub(crate) starting_block_count: u32, pub(crate) starting_timestamp: u128, } trait BitcoinCoreRpcResultExt { fn into_option(self) -> Result>; } impl BitcoinCoreRpcResultExt for Result { fn into_option(self) -> Result> { match self { Ok(ok) => Ok(Some(ok)), Err(bitcoincore_rpc::Error::JsonRpc(bitcoincore_rpc::jsonrpc::error::Error::Rpc(