X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FPersist.ts;fp=ts%2Fstructs%2FPersist.ts;h=dbfc8aeb284ff549bcf8909a73abfb7e6aa86eb0;hb=fed2245c60159f6c074c9ed5c0f3ce273ad9841b;hp=16ebedc5fc1e460558340bb3c793a3210951a837;hpb=e9c2970adecaa14b3e83e11eb160a7bcbdae20da;p=ldk-java diff --git a/ts/structs/Persist.ts b/ts/structs/Persist.ts index 16ebedc5..dbfc8aeb 100644 --- a/ts/structs/Persist.ts +++ b/ts/structs/Persist.ts @@ -34,6 +34,7 @@ import * as bindings from '../bindings' // TODO: figure out location // todo: in-line interface filling persist_new_channel (id: number, data: number): number { const id_hu_conv: OutPoint = new OutPoint(null, id); + id_hu_conv.ptrs_to.add(this); const data_hu_conv: ChannelMonitor = new ChannelMonitor(null, data); Result_NoneChannelMonitorUpdateErrZ ret = arg.persist_new_channel(id_hu_conv, data_hu_conv); result: number = ret != null ? ret.ptr : 0; @@ -42,6 +43,7 @@ import * as bindings from '../bindings' // TODO: figure out location update_persisted_channel (id: number, update: number, data: number): number { const id_hu_conv: OutPoint = new OutPoint(null, id); + id_hu_conv.ptrs_to.add(this); const update_hu_conv: ChannelMonitorUpdate = new ChannelMonitorUpdate(null, update); const data_hu_conv: ChannelMonitor = new ChannelMonitor(null, data); Result_NoneChannelMonitorUpdateErrZ ret = arg.update_persisted_channel(id_hu_conv, update_hu_conv, data_hu_conv);