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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
use hash_types::{BlockHash, FilterHash, FilterHeader};
#[derive(PartialEq, Eq, Clone, Debug)]
pub struct GetCFilters {
pub filter_type: u8,
pub start_height: u32,
pub stop_hash: BlockHash,
}
impl_consensus_encoding!(GetCFilters, filter_type, start_height, stop_hash);
#[derive(PartialEq, Eq, Clone, Debug)]
pub struct CFilter {
pub filter_type: u8,
pub block_hash: BlockHash,
pub filter: Vec<u8>,
}
impl_consensus_encoding!(CFilter, filter_type, block_hash, filter);
#[derive(PartialEq, Eq, Clone, Debug)]
pub struct GetCFHeaders {
pub filter_type: u8,
pub start_height: u32,
pub stop_hash: BlockHash,
}
impl_consensus_encoding!(GetCFHeaders, filter_type, start_height, stop_hash);
#[derive(PartialEq, Eq, Clone, Debug)]
pub struct CFHeaders {
pub filter_type: u8,
pub stop_hash: BlockHash,
pub previous_filter_header: FilterHeader,
pub filter_hashes: Vec<FilterHash>,
}
impl_consensus_encoding!(CFHeaders, filter_type, stop_hash, previous_filter_header, filter_hashes);
#[derive(PartialEq, Eq, Clone, Debug)]
pub struct GetCFCheckpt {
pub filter_type: u8,
pub stop_hash: BlockHash,
}
impl_consensus_encoding!(GetCFCheckpt, filter_type, stop_hash);
#[derive(PartialEq, Eq, Clone, Debug)]
pub struct CFCheckpt {
pub filter_type: u8,
pub stop_hash: BlockHash,
pub filter_headers: Vec<FilterHeader>,
}
impl_consensus_encoding!(CFCheckpt, filter_type, stop_hash, filter_headers);