1
- use crate :: collections:: { BTreeMap , BTreeSet , HashMap } ;
1
+ use crate :: collections:: { BTreeMap , BTreeSet , HashMap , HashSet } ;
2
2
use alloc:: { sync:: Arc , vec:: Vec } ;
3
3
use bitcoin:: { OutPoint , Transaction , TxOut , Txid } ;
4
4
@@ -34,6 +34,8 @@ pub struct TxUpdate<A = ()> {
34
34
/// Seen at times for transactions. This records when a transaction was most recently seen in
35
35
/// the user's mempool for the sake of tie-breaking other conflicting transactions.
36
36
pub seen_ats : HashMap < Txid , u64 > ,
37
+ /// A set of txids missing from the mempool.
38
+ pub missing : HashSet < Txid > ,
37
39
}
38
40
39
41
impl < A > Default for TxUpdate < A > {
@@ -43,6 +45,7 @@ impl<A> Default for TxUpdate<A> {
43
45
txouts : Default :: default ( ) ,
44
46
anchors : Default :: default ( ) ,
45
47
seen_ats : Default :: default ( ) ,
48
+ missing : Default :: default ( ) ,
46
49
}
47
50
}
48
51
}
@@ -62,6 +65,7 @@ impl<A: Ord> TxUpdate<A> {
62
65
. map ( |( a, txid) | ( map ( a) , txid) )
63
66
. collect ( ) ,
64
67
seen_ats : self . seen_ats ,
68
+ missing : self . missing ,
65
69
}
66
70
}
67
71
0 commit comments