1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
crate::ix!();
pub struct PeerOrphans {
/**
| Set of txids to reconsider once their
| parent transactions have been accepted
|
|
*/
orphan_work_set: HashSet<u256>,
}
impl Deref for PeerOrphans {
type Target = HashSet<u256>;
fn deref(&self) -> &Self::Target {
&self.orphan_work_set
}
}
impl DerefMut for PeerOrphans {
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.orphan_work_set
}
}
impl PeerOrphans {
delegate!{
to self.orphan_work_set {
pub fn is_empty(&self) -> bool;
}
}
}
pub struct PeerManagerOrphans {
/**
| Orphan/conflicted/etc transactions
| that are kept for compact block reconstruction.
|
| The last -blockreconstructionextratxn/DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN
| of these are kept in a ring buffer
|
|
*/
pub extra_txn_for_compact: Arc<Mutex<Vec<Option<(u256,TransactionRef)>>>>,
/**
| Offset into vExtraTxnForCompact to
| insert the next tx
|
|
*/
pub extra_txn_for_compact_it: AtomicUsize, // default = 0
}