|
2 | 2 | mod tests { |
3 | 3 | use bitcoin::consensus::deserialize; |
4 | 4 | use libbitcoinkernel_sys::{ |
5 | | - register_validation_interface, unregister_validation_interface, verify, Block, |
6 | | - BlockIndexInfo, BlockManagerOptions, BlockUndo, ChainParams, ChainType, |
7 | | - ChainstateLoadOptions, ChainstateManager, ChainstateManagerOptions, Context, |
8 | | - ContextBuilder, KernelError, KernelNotificationInterfaceCallbackHolder, Log, Logger, |
9 | | - ProcessBlockError, ScriptPubkey, Transaction, TxOut, Utxo, |
10 | | - ValidationInterfaceCallbackHolder, ValidationInterfaceWrapper, VERIFY_ALL_PRE_TAPROOT, |
| 5 | + register_validation_interface, unregister_validation_interface, verify, Block, BlockHash, |
| 6 | + BlockManagerOptions, BlockUndo, ChainParams, ChainType, ChainstateLoadOptions, |
| 7 | + ChainstateManager, ChainstateManagerOptions, Context, ContextBuilder, KernelError, |
| 8 | + KernelNotificationInterfaceCallbackHolder, Log, Logger, ProcessBlockError, ScriptPubkey, |
| 9 | + Transaction, TxOut, Utxo, ValidationInterfaceCallbackHolder, ValidationInterfaceWrapper, |
| 10 | + VERIFY_ALL_PRE_TAPROOT, |
11 | 11 | }; |
12 | 12 | use std::fs::File; |
13 | 13 | use std::io::{BufRead, BufReader}; |
@@ -212,11 +212,11 @@ mod tests { |
212 | 212 | chainman.process_block(&block).unwrap(); |
213 | 213 | } |
214 | 214 | let block_index_genesis = chainman.get_block_index_genesis(); |
215 | | - let info = block_index_genesis.info(); |
216 | | - assert_eq!(info.height, 0); |
| 215 | + let height = block_index_genesis.height(); |
| 216 | + assert_eq!(height, 0); |
217 | 217 | let block_index_1 = chainman.get_next_block_index(block_index_genesis).unwrap(); |
218 | | - let info = block_index_1.info(); |
219 | | - assert_eq!(info.height, 1); |
| 218 | + let height = block_index_1.height(); |
| 219 | + assert_eq!(height, 1); |
220 | 220 |
|
221 | 221 | let block_index_tip = chainman.get_block_index_tip(); |
222 | 222 | let raw_block_tip: Vec<u8> = chainman.read_block_data(&block_index_tip).unwrap().into(); |
@@ -411,9 +411,8 @@ mod tests { |
411 | 411 | is_send::<BlockUndo>(); |
412 | 412 | is_sync::<ChainstateManager>(); |
413 | 413 | is_send::<ChainstateManager>(); |
414 | | - is_sync::<BlockIndexInfo>(); |
415 | | - is_send::<BlockIndexInfo>(); |
416 | | - |
| 414 | + is_sync::<BlockHash>(); |
| 415 | + is_send::<BlockHash>(); |
417 | 416 | // is_sync::<Rc<u8>>(); // won't compile, kept as a failure case. |
418 | 417 | // is_send::<Rc<u8>>(); // won't compile, kept as a failure case. |
419 | 418 | } |
|
0 commit comments