@@ -25,7 +25,7 @@ use bdk_chain::{
2525 keychain:: { self , KeychainTxOutIndex } ,
2626 local_chain:: { self , CannotConnectError , CheckPoint , CheckPointIter , LocalChain } ,
2727 tx_graph:: { CanonicalTx , TxGraph } ,
28- Append , BlockId , ChainPosition , ConfirmationTime , ConfirmationTimeAnchor , FullTxOut ,
28+ Append , BlockId , ChainPosition , ConfirmationTime , ConfirmationTimeHeightAnchor , FullTxOut ,
2929 IndexedTxGraph , Persist , PersistBackend ,
3030} ;
3131use bitcoin:: consensus:: encode:: serialize;
@@ -89,7 +89,7 @@ pub struct Wallet<D = ()> {
8989 signers : Arc < SignersContainer > ,
9090 change_signers : Arc < SignersContainer > ,
9191 chain : LocalChain ,
92- indexed_graph : IndexedTxGraph < ConfirmationTimeAnchor , KeychainTxOutIndex < KeychainKind > > ,
92+ indexed_graph : IndexedTxGraph < ConfirmationTimeHeightAnchor , KeychainTxOutIndex < KeychainKind > > ,
9393 persist : Persist < D , ChangeSet > ,
9494 network : Network ,
9595 secp : SecpCtx ,
@@ -105,7 +105,7 @@ pub struct Update {
105105 pub last_active_indices : BTreeMap < KeychainKind , u32 > ,
106106
107107 /// Update for the wallet's internal [`TxGraph`].
108- pub graph : TxGraph < ConfirmationTimeAnchor > ,
108+ pub graph : TxGraph < ConfirmationTimeHeightAnchor > ,
109109
110110 /// Update for the wallet's internal [`LocalChain`].
111111 ///
@@ -124,8 +124,10 @@ pub struct ChangeSet {
124124 /// Changes to [`IndexedTxGraph`].
125125 ///
126126 /// [`IndexedTxGraph`]: bdk_chain::indexed_tx_graph::IndexedTxGraph
127- pub indexed_tx_graph :
128- indexed_tx_graph:: ChangeSet < ConfirmationTimeAnchor , keychain:: ChangeSet < KeychainKind > > ,
127+ pub indexed_tx_graph : indexed_tx_graph:: ChangeSet <
128+ ConfirmationTimeHeightAnchor ,
129+ keychain:: ChangeSet < KeychainKind > ,
130+ > ,
129131}
130132
131133impl Append for ChangeSet {
@@ -148,12 +150,17 @@ impl From<local_chain::ChangeSet> for ChangeSet {
148150 }
149151}
150152
151- impl From < indexed_tx_graph:: ChangeSet < ConfirmationTimeAnchor , keychain:: ChangeSet < KeychainKind > > >
152- for ChangeSet
153+ impl
154+ From <
155+ indexed_tx_graph:: ChangeSet <
156+ ConfirmationTimeHeightAnchor ,
157+ keychain:: ChangeSet < KeychainKind > ,
158+ > ,
159+ > for ChangeSet
153160{
154161 fn from (
155162 indexed_tx_graph : indexed_tx_graph:: ChangeSet <
156- ConfirmationTimeAnchor ,
163+ ConfirmationTimeHeightAnchor ,
157164 keychain:: ChangeSet < KeychainKind > ,
158165 > ,
159166 ) -> Self {
@@ -279,8 +286,10 @@ impl<D> Wallet<D> {
279286 {
280287 let secp = Secp256k1 :: new ( ) ;
281288 let mut chain = LocalChain :: default ( ) ;
282- let mut indexed_graph =
283- IndexedTxGraph :: < ConfirmationTimeAnchor , KeychainTxOutIndex < KeychainKind > > :: default ( ) ;
289+ let mut indexed_graph = IndexedTxGraph :: <
290+ ConfirmationTimeHeightAnchor ,
291+ KeychainTxOutIndex < KeychainKind > ,
292+ > :: default ( ) ;
284293
285294 let ( descriptor, keymap) = into_wallet_descriptor_checked ( descriptor, & secp, network)
286295 . map_err ( NewError :: Descriptor ) ?;
@@ -654,7 +663,7 @@ impl<D> Wallet<D> {
654663 pub fn get_tx (
655664 & self ,
656665 txid : Txid ,
657- ) -> Option < CanonicalTx < ' _ , Transaction , ConfirmationTimeAnchor > > {
666+ ) -> Option < CanonicalTx < ' _ , Transaction , ConfirmationTimeHeightAnchor > > {
658667 let graph = self . indexed_graph . graph ( ) ;
659668
660669 Some ( CanonicalTx {
@@ -724,7 +733,7 @@ impl<D> Wallet<D> {
724733 tip_height : self . chain . tip ( ) . map ( |b| b. height ( ) ) ,
725734 tx_height : height,
726735 } )
727- . map ( |( & anchor_height, & hash) | ConfirmationTimeAnchor {
736+ . map ( |( & anchor_height, & hash) | ConfirmationTimeHeightAnchor {
728737 anchor_block : BlockId {
729738 height : anchor_height,
730739 hash,
@@ -756,7 +765,7 @@ impl<D> Wallet<D> {
756765 /// Iterate over the transactions in the wallet.
757766 pub fn transactions (
758767 & self ,
759- ) -> impl Iterator < Item = CanonicalTx < ' _ , Transaction , ConfirmationTimeAnchor > > + ' _ {
768+ ) -> impl Iterator < Item = CanonicalTx < ' _ , Transaction , ConfirmationTimeHeightAnchor > > + ' _ {
760769 self . indexed_graph . graph ( ) . list_chain_txs (
761770 & self . chain ,
762771 self . chain . tip ( ) . map ( |cp| cp. block_id ( ) ) . unwrap_or_default ( ) ,
@@ -1973,7 +1982,7 @@ impl<D> Wallet<D> {
19731982 }
19741983
19751984 /// Get a reference to the inner [`TxGraph`].
1976- pub fn tx_graph ( & self ) -> & TxGraph < ConfirmationTimeAnchor > {
1985+ pub fn tx_graph ( & self ) -> & TxGraph < ConfirmationTimeHeightAnchor > {
19771986 self . indexed_graph . graph ( )
19781987 }
19791988
@@ -1988,8 +1997,8 @@ impl<D> Wallet<D> {
19881997 }
19891998}
19901999
1991- impl < D > AsRef < bdk_chain:: tx_graph:: TxGraph < ConfirmationTimeAnchor > > for Wallet < D > {
1992- fn as_ref ( & self ) -> & bdk_chain:: tx_graph:: TxGraph < ConfirmationTimeAnchor > {
2000+ impl < D > AsRef < bdk_chain:: tx_graph:: TxGraph < ConfirmationTimeHeightAnchor > > for Wallet < D > {
2001+ fn as_ref ( & self ) -> & bdk_chain:: tx_graph:: TxGraph < ConfirmationTimeHeightAnchor > {
19932002 self . indexed_graph . graph ( )
19942003 }
19952004}
@@ -2028,7 +2037,7 @@ where
20282037fn new_local_utxo (
20292038 keychain : KeychainKind ,
20302039 derivation_index : u32 ,
2031- full_txo : FullTxOut < ConfirmationTimeAnchor > ,
2040+ full_txo : FullTxOut < ConfirmationTimeHeightAnchor > ,
20322041) -> LocalUtxo {
20332042 LocalUtxo {
20342043 outpoint : full_txo. outpoint ,
0 commit comments