X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FRouteHop.ts;h=3d9e3386c2603688842128fb542778444e23a85c;hb=9e8763c71cd61d55be7c869d973524f75209a3f3;hp=6a943251a6123b289cc2177e1bf8998e85818796;hpb=22f5f4208b1f3b5542292250f1612b944f5cd7fd;p=ldk-java diff --git a/ts/structs/RouteHop.ts b/ts/structs/RouteHop.ts index 6a943251..3d9e3386 100644 --- a/ts/structs/RouteHop.ts +++ b/ts/structs/RouteHop.ts @@ -18,12 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location bindings.RouteHop_free(this.ptr); } } - public RouteHop clone() { - number ret = bindings.RouteHop_clone(this.ptr); - const ret_hu_conv: RouteHop = new RouteHop(null, ret); - return ret_hu_conv; - } - public Uint8Array get_pubkey() { Uint8Array ret = bindings.RouteHop_get_pubkey(this.ptr); return ret; @@ -36,6 +30,7 @@ import * as bindings from '../bindings' // TODO: figure out location public NodeFeatures get_node_features() { number ret = bindings.RouteHop_get_node_features(this.ptr); const ret_hu_conv: NodeFeatures = new NodeFeatures(null, ret); + ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; } @@ -56,6 +51,7 @@ import * as bindings from '../bindings' // TODO: figure out location public ChannelFeatures get_channel_features() { number ret = bindings.RouteHop_get_channel_features(this.ptr); const ret_hu_conv: ChannelFeatures = new ChannelFeatures(null, ret); + ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; } @@ -85,9 +81,17 @@ import * as bindings from '../bindings' // TODO: figure out location public static RouteHop constructor_new(Uint8Array pubkey_arg, NodeFeatures node_features_arg, number short_channel_id_arg, ChannelFeatures channel_features_arg, number fee_msat_arg, number cltv_expiry_delta_arg) { number ret = bindings.RouteHop_new(pubkey_arg, node_features_arg == null ? 0 : node_features_arg.ptr & ~1, short_channel_id_arg, channel_features_arg == null ? 0 : channel_features_arg.ptr & ~1, fee_msat_arg, cltv_expiry_delta_arg); const ret_hu_conv: RouteHop = new RouteHop(null, ret); + ret_hu_conv.ptrs_to.add(ret_hu_conv); ret_hu_conv.ptrs_to.add(node_features_arg); ret_hu_conv.ptrs_to.add(channel_features_arg); return ret_hu_conv; } + public RouteHop clone() { + number ret = bindings.RouteHop_clone(this.ptr); + const ret_hu_conv: RouteHop = new RouteHop(null, ret); + ret_hu_conv.ptrs_to.add(this); + return ret_hu_conv; + } + }