@@ -15,7 +15,7 @@ use util::logger::Logger;
15
15
use util:: config:: UserConfig ;
16
16
17
17
use bitcoin:: util:: hash:: BitcoinHash ;
18
- use bitcoin:: blockdata:: block:: { BlockHeader , Block } ;
18
+ use bitcoin:: blockdata:: block:: BlockHeader ;
19
19
use bitcoin:: blockdata:: transaction:: { Transaction , TxOut } ;
20
20
use bitcoin:: network:: constants:: Network ;
21
21
@@ -56,20 +56,6 @@ pub fn connect_blocks(chain: &chaininterface::ChainWatchInterfaceUtil, depth: u3
56
56
header. bitcoin_hash ( )
57
57
}
58
58
59
- pub fn disconnect_blocks ( chain : & chaininterface:: ChainWatchInterfaceUtil , depth : u32 , height : u32 , parent : bool , prev_blockhash : Sha256d ) {
60
- let mut header = BlockHeader { version : 0x2000000 , prev_blockhash : if parent { prev_blockhash } else { Default :: default ( ) } , merkle_root : Default :: default ( ) , time : 42 , bits : 42 , nonce : 42 } ;
61
- let mut blocks = Vec :: new ( ) ;
62
- for _ in 0 ..depth {
63
- blocks. push ( Block { header, txdata : Vec :: new ( ) } ) ;
64
- header = BlockHeader { version : 0x20000000 , prev_blockhash : header. bitcoin_hash ( ) , merkle_root : Default :: default ( ) , time : 42 , bits : 42 , nonce : 42 } ;
65
- }
66
- let mut height = height;
67
- for block in blocks. pop ( ) {
68
- chain. block_disconnected ( & block. header , height) ;
69
- height -= 1 ;
70
- }
71
- }
72
-
73
59
pub struct Node {
74
60
pub chain_monitor : Arc < chaininterface:: ChainWatchInterfaceUtil > ,
75
61
pub tx_broadcaster : Arc < test_utils:: TestBroadcaster > ,
0 commit comments