[bdk_chain_redesign] Add tests for TxGraph::relevant_heights

This commit is contained in:
志宇
2023-04-19 16:14:52 +08:00
parent 8e36a2e5f6
commit 7175a82c04
2 changed files with 69 additions and 1 deletions

View File

@@ -602,7 +602,7 @@ impl<A: Clone + Ord> TxGraph<A> {
impl<A: Anchor> TxGraph<A> {
/// Get all heights that are relevant to the graph.
pub fn relevant_heights(&self) -> impl Iterator<Item = u32> + '_ {
pub fn relevant_heights(&self) -> impl DoubleEndedIterator<Item = u32> + '_ {
let mut visited = HashSet::new();
self.anchors
.iter()