@@ -27,7 +27,7 @@ use core::fmt::Debug;
2727#[ derive( Clone , Debug , PartialEq ) ]
2828pub struct ChainGraph < P = TxHeight > {
2929 chain : SparseChain < P > ,
30- graph : TxGraph < BlockId > ,
30+ graph : TxGraph ,
3131}
3232
3333impl < P > Default for ChainGraph < P > {
@@ -45,8 +45,8 @@ impl<P> AsRef<SparseChain<P>> for ChainGraph<P> {
4545 }
4646}
4747
48- impl < P > AsRef < TxGraph < BlockId > > for ChainGraph < P > {
49- fn as_ref ( & self ) -> & TxGraph < BlockId > {
48+ impl < P > AsRef < TxGraph > for ChainGraph < P > {
49+ fn as_ref ( & self ) -> & TxGraph {
5050 & self . graph
5151 }
5252}
@@ -64,7 +64,7 @@ impl<P> ChainGraph<P> {
6464 }
6565
6666 /// Returns a reference to the internal [`TxGraph`].
67- pub fn graph ( & self ) -> & TxGraph < BlockId > {
67+ pub fn graph ( & self ) -> & TxGraph {
6868 & self . graph
6969 }
7070}
8181 /// transaction in `graph`.
8282 /// 2. The `chain` has two transactions that are allegedly in it, but they conflict in the `graph`
8383 /// (so could not possibly be in the same chain).
84- pub fn new ( chain : SparseChain < P > , graph : TxGraph < BlockId > ) -> Result < Self , NewError < P > > {
84+ pub fn new ( chain : SparseChain < P > , graph : TxGraph ) -> Result < Self , NewError < P > > {
8585 let mut missing = HashSet :: default ( ) ;
8686 for ( pos, txid) in chain. txids ( ) {
8787 if let Some ( graphed_tx) = graph. get_tx ( * txid) {
@@ -212,7 +212,7 @@ where
212212 ///
213213 /// This does not necessarily mean that it is *confirmed* in the blockchain; it might just be in
214214 /// the unconfirmed transaction list within the [`SparseChain`].
215- pub fn get_tx_in_chain ( & self , txid : Txid ) -> Option < ( & P , TxInGraph < ' _ , Transaction , BlockId > ) > {
215+ pub fn get_tx_in_chain ( & self , txid : Txid ) -> Option < ( & P , TxInGraph < ' _ , Transaction , ( ) > ) > {
216216 let position = self . chain . tx_position ( txid) ?;
217217 let graphed_tx = self . graph . get_tx ( txid) . expect ( "must exist" ) ;
218218 Some ( ( position, graphed_tx) )
@@ -430,7 +430,7 @@ where
430430 /// in ascending order.
431431 pub fn transactions_in_chain (
432432 & self ,
433- ) -> impl DoubleEndedIterator < Item = ( & P , TxInGraph < ' _ , Transaction , BlockId > ) > {
433+ ) -> impl DoubleEndedIterator < Item = ( & P , TxInGraph < ' _ , Transaction , ( ) > ) > {
434434 self . chain
435435 . txids ( )
436436 . map ( move |( pos, txid) | ( pos, self . graph . get_tx ( * txid) . expect ( "must exist" ) ) )
@@ -469,7 +469,7 @@ where
469469#[ must_use]
470470pub struct ChangeSet < P > {
471471 pub chain : sparse_chain:: ChangeSet < P > ,
472- pub graph : tx_graph:: Additions < BlockId > ,
472+ pub graph : tx_graph:: Additions < ( ) > ,
473473}
474474
475475impl < P > ChangeSet < P > {
0 commit comments