@@ -4,9 +4,8 @@ use core::convert::Infallible;
4
4
use core:: fmt;
5
5
use core:: ops:: RangeBounds ;
6
6
7
- use crate :: canonical_task:: CanonicalizationTask ;
8
7
use crate :: collections:: BTreeMap ;
9
- use crate :: { Anchor , BlockId , CanonicalView , ChainOracle , Merge } ;
8
+ use crate :: { BlockId , ChainOracle , Merge } ;
10
9
use bdk_core:: { ChainQuery , ToBlockHash } ;
11
10
pub use bdk_core:: { CheckPoint , CheckPointIter } ;
12
11
use bitcoin:: block:: Header ;
@@ -129,8 +128,8 @@ impl LocalChain<BlockHash> {
129
128
130
129
/// Canonicalize a transaction graph using this chain.
131
130
///
132
- /// This method processes a [`CanonicalizationTask `], handling all its requests
133
- /// to determine which transactions are canonical, and returns a [`CanonicalView`] .
131
+ /// This method processes any type implementing [`ChainQuery `], handling all its requests
132
+ /// to determine which transactions are canonical, and returns the query's output .
134
133
///
135
134
/// # Example
136
135
///
@@ -144,10 +143,10 @@ impl LocalChain<BlockHash> {
144
143
/// let task = CanonicalizationTask::new(&tx_graph, chain_tip, CanonicalizationParams::default());
145
144
/// let view = chain.canonicalize(task);
146
145
/// ```
147
- pub fn canonicalize < A : Anchor > (
148
- & self ,
149
- mut task : CanonicalizationTask < ' _ , A > ,
150
- ) -> CanonicalView < A > {
146
+ pub fn canonicalize < Q > ( & self , mut task : Q ) -> Q :: Output
147
+ where
148
+ Q : ChainQuery < BlockId > ,
149
+ {
151
150
// Process all requests from the task
152
151
while let Some ( request) = task. next_query ( ) {
153
152
let chain_tip = request. chain_tip ;
0 commit comments