From: 志宇 Date: Tue, 25 Apr 2023 17:09:19 +0000 (+0800) Subject: [bdk_chain_redesign] Fix `tx_graph::Additions::append` logic X-Git-Tag: v1.0.0-alpha.1~19^2~4 X-Git-Url: http://internal-gitweb-vhost/script/%22https:/struct.CommandStringError.html?a=commitdiff_plain;h=f101dde09b6067c17b0b64ea3e3efd358a32a820;p=bdk [bdk_chain_redesign] Fix `tx_graph::Additions::append` logic --- diff --git a/crates/chain/src/tx_graph.rs b/crates/chain/src/tx_graph.rs index 04c9fa27..4f549dc8 100644 --- a/crates/chain/src/tx_graph.rs +++ b/crates/chain/src/tx_graph.rs @@ -947,9 +947,14 @@ impl Additions { /// Appends the changes in `other` into self such that applying `self` afterward has the same /// effect as sequentially applying the original `self` and `other`. - pub fn append(&mut self, mut other: Additions) { + pub fn append(&mut self, mut other: Additions) + where + A: Ord, + { self.tx.append(&mut other.tx); self.txout.append(&mut other.txout); + self.anchors.append(&mut other.anchors); + self.last_seen.append(&mut other.last_seen); } }