Skip to content

Commit dbbd514

Browse files
committed
fix(chain)!: rm duplicate is_empty method in tx graph changeset
1 parent ae00e1e commit dbbd514

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

crates/chain/src/tx_graph.rs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@
6767
//!
6868
//! // if we apply it again, the resulting changeset will be empty
6969
//! let changeset = graph.apply_update(update);
70-
//! assert!(changeset.is_empty());
70+
//! assert!({
71+
//! use bdk_chain::Append;
72+
//! changeset.is_empty()
73+
//! });
7174
//! ```
7275
//! [`try_get_chain_position`]: TxGraph::try_get_chain_position
7376
//! [`insert_txout`]: TxGraph::insert_txout
@@ -1212,14 +1215,6 @@ impl<A> Default for ChangeSet<A> {
12121215
}
12131216

12141217
impl<A> ChangeSet<A> {
1215-
/// Returns true if the [`ChangeSet`] is empty (no transactions or txouts).
1216-
pub fn is_empty(&self) -> bool {
1217-
self.txs.is_empty()
1218-
&& self.txouts.is_empty()
1219-
&& self.anchors.is_empty()
1220-
&& self.last_seen.is_empty()
1221-
}
1222-
12231218
/// Iterates over all outpoints contained within [`ChangeSet`].
12241219
pub fn txouts(&self) -> impl Iterator<Item = (OutPoint, &TxOut)> {
12251220
self.txs

0 commit comments

Comments
 (0)