Skip to content

Commit b2b9d45

Browse files
committed
automatically add anchors for constructors that take struct objects as arguments
1 parent a086cb7 commit b2b9d45

File tree

98 files changed

+141
-101
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+141
-101
lines changed

bindings/LDK/Bindings.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6460,7 +6460,7 @@ withUnsafePointer(to: scorer.cOpaqueStruct!) { (scorerPointer: UnsafePointer<LDK
64606460
*/
64616461

64626462
public class func get_ldk_swift_bindings_version() -> String {
6463-
return "f1048790a01d5323ee08d1d8add936c2841b0a25"
6463+
return "a086cb7d66870a61b4c5b98ae5d293d840342ad0"
64646464
}
64656465

64666466
}

bindings/LDK/structs/AnnouncementSignatures.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class AnnouncementSignatures: NativeTypeWrapper {
1313

1414
self.cOpaqueStruct = AnnouncementSignatures_new(Bindings.new_LDKThirtyTwoBytes(array: channel_id_arg), short_channel_id_arg, Bindings.new_LDKSignature(array: node_signature_arg), Bindings.new_LDKSignature(array: bitcoin_signature_arg))
1515
super.init(conflictAvoidingVariableName: 0)
16-
/* POST_INIT_ANCHORING */
16+
1717
}
1818
/* DEFAULT_CONSTRUCTOR_END */
1919

bindings/LDK/structs/BackgroundProcessor.swift

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,18 @@ BackgroundProcessor_start(persister.cOpaqueStruct!, event_handler.cOpaqueStruct!
2323
}
2424
}
2525
super.init(conflictAvoidingVariableName: 0)
26-
/* POST_INIT_ANCHORING */
26+
try? self.addAnchor(anchor: persister)
27+
try? self.addAnchor(anchor: event_handler)
28+
try? self.addAnchor(anchor: chain_monitor)
29+
try? self.addAnchor(anchor: channel_manager)
30+
31+
if let handler = net_graph_msg_handler {
32+
try? self.addAnchor(anchor: handler)
33+
}
34+
35+
try? self.addAnchor(anchor: peer_manager)
36+
try? self.addAnchor(anchor: logger)
37+
2738
}
2839
/* DEFAULT_CONSTRUCTOR_END */
2940

bindings/LDK/structs/BestBlock.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class BestBlock: NativeTypeWrapper {
1313

1414
self.cOpaqueStruct = BestBlock_new(Bindings.new_LDKThirtyTwoBytes(array: block_hash), height)
1515
super.init(conflictAvoidingVariableName: 0)
16-
/* POST_INIT_ANCHORING */
16+
1717
}
1818
/* DEFAULT_CONSTRUCTOR_END */
1919

bindings/LDK/structs/BuiltCommitmentTransaction.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class BuiltCommitmentTransaction: NativeTypeWrapper {
1818

1919
self.cOpaqueStruct = BuiltCommitmentTransaction_new(transaction_argWrapper.dangle().cOpaqueStruct!, Bindings.new_LDKThirtyTwoBytes(array: txid_arg))
2020
super.init(conflictAvoidingVariableName: 0)
21-
/* POST_INIT_ANCHORING */
21+
2222
}
2323
/* DEFAULT_CONSTRUCTOR_END */
2424

bindings/LDK/structs/ChainMonitor.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@ public init(chain_source: Option_FilterZ, broadcaster: BroadcasterInterface, log
1515

1616
self.cOpaqueStruct = ChainMonitor_new(chain_source.cOpaqueStruct!, broadcaster.cOpaqueStruct!, logger.cOpaqueStruct!, feeest.cOpaqueStruct!, persister.cOpaqueStruct!)
1717
super.init(conflictAvoidingVariableName: 0)
18-
/* POST_INIT_ANCHORING */
18+
try? self.addAnchor(anchor: chain_source)
19+
try? self.addAnchor(anchor: broadcaster)
20+
try? self.addAnchor(anchor: logger)
21+
try? self.addAnchor(anchor: feeest)
22+
try? self.addAnchor(anchor: persister)
23+
1924
}
2025
/* DEFAULT_CONSTRUCTOR_END */
2126

bindings/LDK/structs/ChainParameters.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public init(network_arg: LDKNetwork, best_block_arg: BestBlock) {
1515

1616
self.cOpaqueStruct = ChainParameters_new(network_arg, best_block_arg.danglingClone().cOpaqueStruct!)
1717
super.init(conflictAvoidingVariableName: 0)
18-
/* POST_INIT_ANCHORING */
18+
1919
}
2020
/* DEFAULT_CONSTRUCTOR_END */
2121

bindings/LDK/structs/ChannelAnnouncement.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class ChannelAnnouncement: NativeTypeWrapper {
1313

1414
self.cOpaqueStruct = ChannelAnnouncement_new(Bindings.new_LDKSignature(array: node_signature_1_arg), Bindings.new_LDKSignature(array: node_signature_2_arg), Bindings.new_LDKSignature(array: bitcoin_signature_1_arg), Bindings.new_LDKSignature(array: bitcoin_signature_2_arg), contents_arg.danglingClone().cOpaqueStruct!)
1515
super.init(conflictAvoidingVariableName: 0)
16-
/* POST_INIT_ANCHORING */
16+
1717
}
1818
/* DEFAULT_CONSTRUCTOR_END */
1919

bindings/LDK/structs/ChannelConfig.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class ChannelConfig: NativeTypeWrapper {
1313

1414
self.cOpaqueStruct = ChannelConfig_default()
1515
super.init(conflictAvoidingVariableName: 0)
16-
/* POST_INIT_ANCHORING */
16+
1717
}
1818
/* DEFAULT_CONSTRUCTOR_END */
1919

bindings/LDK/structs/ChannelCounterparty.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class ChannelCounterparty: NativeTypeWrapper {
1313

1414
self.cOpaqueStruct = ChannelCounterparty_new(Bindings.new_LDKPublicKey(array: node_id_arg), features_arg.danglingClone().cOpaqueStruct!, unspendable_punishment_reserve_arg, forwarding_info_arg.danglingClone().cOpaqueStruct!)
1515
super.init(conflictAvoidingVariableName: 0)
16-
/* POST_INIT_ANCHORING */
16+
1717
}
1818
/* DEFAULT_CONSTRUCTOR_END */
1919

0 commit comments

Comments
 (0)