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 {
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 {
pub extra_txn_for_compact: Arc<Mutex<Vec<Option<(u256,TransactionRef)>>>>,
pub extra_txn_for_compact_it: AtomicUsize, }