]> Untitled Git - bdk/commitdiff
[bdk_chain_redesign] Fix `tx_graph::Additions::append` logic
author志宇 <hello@evanlinjin.me>
Tue, 25 Apr 2023 17:09:19 +0000 (01:09 +0800)
committer志宇 <hello@evanlinjin.me>
Tue, 25 Apr 2023 17:27:47 +0000 (01:27 +0800)
crates/chain/src/tx_graph.rs

index 04c9fa271bbc9c7b07faed3a187e380cb3ffff77..4f549dc8b7f4edff4c649cb7d5d7f857ee010072 100644 (file)
@@ -947,9 +947,14 @@ impl<A> Additions<A> {
 
     /// 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<A>) {
+    pub fn append(&mut self, mut other: Additions<A>)
+    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);
     }
 }