@@ -58,24 +58,25 @@ def generate_opaque_struct(self, struct_name, struct_details, all_type_details={
58
58
print (f'(opaque_struct_generator.py#constructor, warned, deprecated) { cloneability_warning } : { constructor_native_name } [{ cloneability_type_message } ]' )
59
59
60
60
if constructor_native_name == 'BackgroundProcessor_start' :
61
- previous_swift_argument = constructor_swift_arguments [4 ]
62
- previous_native_argument = constructor_native_arguments [4 ]
63
- new_swift_argument = 'gossip_sync: GossipSync?'
64
- new_native_argument = 'graphMessageHandler'
61
+ replaced_argument_index = 7
62
+ previous_swift_argument = constructor_swift_arguments [replaced_argument_index ]
63
+ previous_native_argument = constructor_native_arguments [replaced_argument_index ]
64
+ new_swift_argument = 'scorer: MultiThreadedLockableScore?'
65
+ new_native_argument = 'nativeScorer'
65
66
print (f'''
66
67
Replacing { constructor_native_name } :
67
68
Swift argument `{ previous_swift_argument } ` -> `{ new_swift_argument } `
68
69
Native argument `{ previous_native_argument } ` -> `{ new_native_argument } `
69
70
''' )
70
71
71
- constructor_swift_arguments [4 ] = new_swift_argument
72
- constructor_native_call_prep += '\n let graphMessageHandler = gossip_sync ?.cOpaqueStruct! ?? GossipSync_none( )\n '
73
- constructor_post_init_anchoring = constructor_post_init_anchoring .replace ('try? self.addAnchor(anchor: gossip_sync )' , '''
74
- if let handler = gossip_sync {
75
- try? self.addAnchor(anchor: handler )
72
+ constructor_swift_arguments [replaced_argument_index ] = new_swift_argument
73
+ constructor_native_call_prep += '\n let nativeScorer = scorer ?.cOpaqueStruct! ?? LDKMultiThreadedLockableScore(inner: nil, is_owned: true )\n '
74
+ constructor_post_init_anchoring = constructor_post_init_anchoring .replace ('try? self.addAnchor(anchor: scorer )' , '''
75
+ if let certainScorer = scorer {
76
+ try? self.addAnchor(anchor: certainScorer )
76
77
}
77
78
''' )
78
- constructor_native_arguments [4 ] = new_native_argument
79
+ constructor_native_arguments [replaced_argument_index ] = new_native_argument
79
80
80
81
81
82
mutating_output_file_contents = mutating_output_file_contents .replace ('public init' , f'{ deprecation_prefix } public init' )
0 commit comments