@@ -15,7 +15,6 @@ use libbitcoinkernel_sys::{
1515fn create_context ( chain_type : ChainType ) -> Context {
1616 ContextBuilder :: new ( )
1717 . chain_type ( chain_type)
18- . unwrap ( )
1918 . kn_callbacks ( Box :: new ( KernelNotificationInterfaceCallbackHolder {
2019 kn_block_tip : Box :: new ( |_state, _block_index| { } ) ,
2120 kn_header_tip : Box :: new ( |_state, _height, _timestamp, _presync| { } ) ,
@@ -25,7 +24,6 @@ fn create_context(chain_type: ChainType) -> Context {
2524 kn_flush_error : Box :: new ( |_message| { } ) ,
2625 kn_fatal_error : Box :: new ( |_message| { } ) ,
2726 } ) )
28- . unwrap ( )
2927 . build ( )
3028 . unwrap ( )
3129}
@@ -89,15 +87,13 @@ fuzz_target!(|data: ChainstateManagerInput| {
8987 match chainman. load_chainstate(
9088 ChainstateLoadOptions :: new( )
9189 . set_reindex( data. wipe_block_index)
92- . unwrap( )
9390 . set_wipe_chainstate_db( data. wipe_chainstate_index)
94- . unwrap( )
9591 . set_block_tree_db_in_memory( data. block_tree_db_in_memory)
96- . unwrap( )
97- . set_chainstate_db_in_memory( data. chainstate_db_in_memory)
98- . unwrap( ) ,
92+ . set_chainstate_db_in_memory( data. chainstate_db_in_memory) ,
9993 ) {
100- Err ( libbitcoinkernel_sys:: KernelError :: Internal ( _) ) => { }
94+ Err ( libbitcoinkernel_sys:: KernelError :: Internal ( _) ) => {
95+ return ;
96+ }
10197 Err ( err) => {
10298 let _ = std:: fs:: remove_dir_all( data_dir) ;
10399 panic!( "this should never happen: {}" , err) ;
0 commit comments