From f101dde09b6067c17b0b64ea3e3efd358a32a820 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BF=97=E5=AE=87?= Date: Wed, 26 Apr 2023 01:09:19 +0800 Subject: [PATCH] [bdk_chain_redesign] Fix `tx_graph::Additions::append` logic --- crates/chain/src/tx_graph.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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); } }