-pub fn disconnect_blocks(chain: &chaininterface::ChainWatchInterfaceUtil, depth: u32, height: u32, parent: bool, prev_blockhash: Sha256d) {
- 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 };
- let mut blocks = Vec::new();
- for _ in 0..depth {
- blocks.push(Block { header, txdata: Vec::new() });
- header = BlockHeader { version: 0x20000000, prev_blockhash: header.bitcoin_hash(), merkle_root: Default::default(), time: 42, bits: 42, nonce: 42 };
- }
- let mut height = height;
- for block in blocks.pop() {
- chain.block_disconnected(&block.header, height);
- height -= 1;
- }
-}
-