File tree Expand file tree Collapse file tree 5 files changed +12
-40
lines changed Expand file tree Collapse file tree 5 files changed +12
-40
lines changed Original file line number Diff line number Diff line change @@ -43,14 +43,6 @@ impl Callback for Balances {
43
43
Ok ( ( ) )
44
44
}
45
45
46
- fn on_header (
47
- & mut self ,
48
- _header : & bitcoin:: blockdata:: block:: Header ,
49
- _block_height : u64 ,
50
- ) -> anyhow:: Result < ( ) > {
51
- Ok ( ( ) )
52
- }
53
-
54
46
/// For each transaction in the block
55
47
/// 1. apply input transactions (remove (TxID == prevTxIDOut and prevOutID == spentOutID))
56
48
/// 2. apply output transactions (add (TxID + curOutID -> HashMapVal))
Original file line number Diff line number Diff line change @@ -15,20 +15,28 @@ pub trait Callback {
15
15
Self : Sized ;
16
16
17
17
/// Gets called shortly before the blocks are parsed.
18
- fn on_start ( & mut self , block_height : u64 ) -> anyhow:: Result < ( ) > ;
18
+ fn on_start ( & mut self , _block_height : u64 ) -> anyhow:: Result < ( ) > {
19
+ Ok ( ( ) )
20
+ }
19
21
20
22
/// Gets called if a new header is available.
21
23
fn on_header (
22
24
& mut self ,
23
25
_header : & bitcoin:: blockdata:: block:: Header ,
24
26
_block_height : u64 ,
25
- ) -> anyhow:: Result < ( ) > ;
27
+ ) -> anyhow:: Result < ( ) > {
28
+ Ok ( ( ) )
29
+ }
26
30
27
31
/// Gets called if a new block is available.
28
- fn on_block ( & mut self , block : & bitcoin:: Block , block_height : u64 ) -> anyhow:: Result < ( ) > ;
32
+ fn on_block ( & mut self , _block : & bitcoin:: Block , _block_height : u64 ) -> anyhow:: Result < ( ) > {
33
+ Ok ( ( ) )
34
+ }
29
35
30
36
/// Gets called if the parser has finished and all blocks are handled
31
- fn on_complete ( & mut self , block_height : u64 ) -> anyhow:: Result < ( ) > ;
37
+ fn on_complete ( & mut self , _block_height : u64 ) -> anyhow:: Result < ( ) > {
38
+ Ok ( ( ) )
39
+ }
32
40
}
33
41
34
42
pub struct UnspentValue {
Original file line number Diff line number Diff line change @@ -18,14 +18,6 @@ impl Callback for OpReturn {
18
18
Ok ( ( ) )
19
19
}
20
20
21
- fn on_header (
22
- & mut self ,
23
- _header : & bitcoin:: blockdata:: block:: Header ,
24
- _block_height : u64 ,
25
- ) -> anyhow:: Result < ( ) > {
26
- Ok ( ( ) )
27
- }
28
-
29
21
fn on_block ( & mut self , block : & bitcoin:: Block , block_height : u64 ) -> anyhow:: Result < ( ) > {
30
22
for tx in & block. txdata {
31
23
for out in & tx. output {
@@ -51,8 +43,4 @@ impl Callback for OpReturn {
51
43
}
52
44
Ok ( ( ) )
53
45
}
54
-
55
- fn on_complete ( & mut self , _: u64 ) -> anyhow:: Result < ( ) > {
56
- Ok ( ( ) )
57
- }
58
46
}
Original file line number Diff line number Diff line change @@ -186,14 +186,6 @@ impl Callback for SimpleStats {
186
186
Ok ( ( ) )
187
187
}
188
188
189
- fn on_header (
190
- & mut self ,
191
- _header : & bitcoin:: blockdata:: block:: Header ,
192
- _block_height : u64 ,
193
- ) -> anyhow:: Result < ( ) > {
194
- Ok ( ( ) )
195
- }
196
-
197
189
fn on_block ( & mut self , block : & bitcoin:: Block , block_height : u64 ) -> anyhow:: Result < ( ) > {
198
190
self . n_valid_blocks += 1 ;
199
191
self . n_tx += block. txdata . len ( ) ;
Original file line number Diff line number Diff line change @@ -45,14 +45,6 @@ impl crate::callbacks::Callback for UnspentCsvDump {
45
45
Ok ( ( ) )
46
46
}
47
47
48
- fn on_header (
49
- & mut self ,
50
- _header : & bitcoin:: blockdata:: block:: Header ,
51
- _block_height : u64 ,
52
- ) -> anyhow:: Result < ( ) > {
53
- Ok ( ( ) )
54
- }
55
-
56
48
/// For each transaction in the block
57
49
/// 1. apply input transactions (remove (TxID == prevTxIDOut and prevOutID == spentOutID))
58
50
/// 2. apply output transactions (add (TxID + curOutID -> HashMapVal))
You can’t perform that action at this time.
0 commit comments