@@ -20,9 +20,9 @@ uint32_t get_fee(const void *this_arg, LDKConfirmationTarget target) {
20
20
}
21
21
}
22
22
23
- void broadcast_tx (const void * this_arg , LDKTransaction tx ) {
23
+ void broadcast_txn (const void * this_arg , LDKCVec_TransactionZ txn ) {
24
24
//TODO
25
- Transaction_free ( tx );
25
+ CVec_TransactionZ_free ( txn );
26
26
}
27
27
28
28
LDKChannelMonitorUpdateStatus add_channel_monitor (const void * this_arg , LDKOutPoint funding_txo , LDKChannelMonitor monitor ) {
@@ -44,12 +44,12 @@ void never_handle_event(const void *this_arg, const struct LDKEvent event) {
44
44
assert (false);
45
45
}
46
46
47
- LDKCResult_RouteLightningErrorZ do_find_route (const void * this_arg , LDKPublicKey payer , const LDKRouteParameters * route_params , LDKCVec_ChannelDetailsZ * first_hops , const LDKInFlightHtlcs * inflight_htlcs ) {
47
+ LDKCResult_RouteLightningErrorZ do_find_route (const void * this_arg , LDKPublicKey payer , const LDKRouteParameters * route_params , LDKCVec_ChannelDetailsZ * first_hops , const LDKInFlightHtlcs inflight_htlcs ) {
48
48
LDKStr reason = { .chars = (const unsigned char * )"" , .len = 0 , .chars_is_owned = false };
49
49
return CResult_RouteLightningErrorZ_err (LightningError_new (reason , ErrorAction_ignore_error ()));
50
50
}
51
51
52
- LDKCResult_RouteLightningErrorZ do_find_route_with_id (const void * this_arg , LDKPublicKey payer , const LDKRouteParameters * route_params , LDKCVec_ChannelDetailsZ * first_hops , const LDKInFlightHtlcs * inflight_htlcs , struct LDKThirtyTwoBytes payment_hash , struct LDKThirtyTwoBytes payment_id ) {
52
+ LDKCResult_RouteLightningErrorZ do_find_route_with_id (const void * this_arg , LDKPublicKey payer , const LDKRouteParameters * route_params , LDKCVec_ChannelDetailsZ * first_hops , const LDKInFlightHtlcs inflight_htlcs , struct LDKThirtyTwoBytes payment_hash , struct LDKThirtyTwoBytes payment_id ) {
53
53
LDKStr reason = { .chars = (const unsigned char * )"" , .len = 0 , .chars_is_owned = false };
54
54
return CResult_RouteLightningErrorZ_err (LightningError_new (reason , ErrorAction_ignore_error ()));
55
55
}
@@ -82,7 +82,7 @@ int main() {
82
82
83
83
LDKBroadcasterInterface broadcast = {
84
84
.this_arg = NULL ,
85
- .broadcast_transaction = broadcast_tx ,
85
+ .broadcast_transactions = broadcast_txn ,
86
86
.free = NULL ,
87
87
};
88
88
@@ -102,7 +102,7 @@ int main() {
102
102
LDKThirtyTwoBytes chain_tip ;
103
103
memset (& chain_tip , 0 , 32 );
104
104
LDKChainParameters chain = ChainParameters_new (net , BestBlock_new (chain_tip , 0 ));
105
- LDKChannelManager cm = ChannelManager_new (fee_est , mon , broadcast , router , logger , entropy_source , node_signer , signer_provider , config , chain );
105
+ LDKChannelManager cm = ChannelManager_new (fee_est , mon , broadcast , router , logger , entropy_source , node_signer , signer_provider , config , chain , 42 );
106
106
107
107
LDKCVec_ChannelDetailsZ channels = ChannelManager_list_channels (& cm );
108
108
assert ((unsigned long )channels .data < 4096 ); // There's an offset, but it should still be an offset against null in the 0 page
0 commit comments