@@ -98,37 +98,14 @@ use crate::{Anchor, Balance, ChainOracle, ChainPosition, FullTxOut, Merge};
98
98
use alloc:: collections:: vec_deque:: VecDeque ;
99
99
use alloc:: sync:: Arc ;
100
100
use alloc:: vec:: Vec ;
101
+ pub use bdk_core:: tx_graph:: Update ;
101
102
use bitcoin:: { Amount , OutPoint , ScriptBuf , SignedAmount , Transaction , TxOut , Txid } ;
102
103
use core:: fmt:: { self , Formatter } ;
103
104
use core:: {
104
105
convert:: Infallible ,
105
106
ops:: { Deref , RangeInclusive } ,
106
107
} ;
107
108
108
- /// Data object used to update the [`TxGraph`] with.
109
- #[ derive( Debug , Clone ) ]
110
- pub struct Update < A = ( ) > {
111
- /// Full transactions.
112
- pub txs : Vec < Arc < Transaction > > ,
113
- /// Floating txouts.
114
- pub txouts : BTreeMap < OutPoint , TxOut > ,
115
- /// Transaction anchors.
116
- pub anchors : BTreeSet < ( A , Txid ) > ,
117
- /// Seen at times for transactions.
118
- pub seen_ats : HashMap < Txid , u64 > ,
119
- }
120
-
121
- impl < A > Default for Update < A > {
122
- fn default ( ) -> Self {
123
- Self {
124
- txs : Default :: default ( ) ,
125
- txouts : Default :: default ( ) ,
126
- anchors : Default :: default ( ) ,
127
- seen_ats : Default :: default ( ) ,
128
- }
129
- }
130
- }
131
-
132
109
impl < A > From < TxGraph < A > > for Update < A > {
133
110
fn from ( graph : TxGraph < A > ) -> Self {
134
111
Self {
@@ -151,16 +128,6 @@ impl<A: Ord + Clone> From<Update<A>> for TxGraph<A> {
151
128
}
152
129
}
153
130
154
- impl < A : Ord > Update < A > {
155
- /// Extend this update with `other`.
156
- pub fn extend ( & mut self , other : Update < A > ) {
157
- self . txs . extend ( other. txs ) ;
158
- self . txouts . extend ( other. txouts ) ;
159
- self . anchors . extend ( other. anchors ) ;
160
- self . seen_ats . extend ( other. seen_ats ) ;
161
- }
162
- }
163
-
164
131
/// A graph of transactions and spends.
165
132
///
166
133
/// See the [module-level documentation] for more.
0 commit comments