File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -171,8 +171,8 @@ impl From<ChainType> for kernel_ChainType {
171171 }
172172}
173173
174- pub trait KNBlockTipFn : Fn ( SynchronizationState , * mut kernel_BlockIndex ) { }
175- impl < F : Fn ( SynchronizationState , * mut kernel_BlockIndex ) > KNBlockTipFn for F { }
174+ pub trait KNBlockTipFn : Fn ( SynchronizationState , BlockHash ) { }
175+ impl < F : Fn ( SynchronizationState , BlockHash ) > KNBlockTipFn for F { }
176176
177177pub trait KNHeaderTipFn : Fn ( SynchronizationState , i64 , i64 , bool ) { }
178178impl < F : Fn ( SynchronizationState , i64 , i64 , bool ) > KNHeaderTipFn for F { }
@@ -209,7 +209,11 @@ unsafe extern "C" fn kn_block_tip_wrapper(
209209 block_index : * mut kernel_BlockIndex ,
210210) {
211211 let holder = & * ( user_data as * mut KernelNotificationInterfaceCallbackHolder ) ;
212- ( holder. kn_block_tip ) ( state. into ( ) , block_index) ;
212+ let hash = kernel_block_index_get_block_hash ( block_index) ;
213+ let res = BlockHash {
214+ hash : ( & * hash) . hash ,
215+ } ;
216+ ( holder. kn_block_tip ) ( state. into ( ) , res) ;
213217}
214218
215219unsafe extern "C" fn kn_header_tip_wrapper (
You can’t perform that action at this time.
0 commit comments