@@ -126,7 +126,7 @@ public Result_NoneChannelMonitorUpdateErrZ watch_channel(OutPoint funding_txo, C
126126 synchronized (monitors ) {
127127 assert monitors .put (Arrays .toString (funding_txo .get_txid ()), monitor ) == null ;
128128 }
129- return new Result_NoneChannelMonitorUpdateErrZ .Result_NoneChannelMonitorUpdateErrZ_OK ();
129+ return Result_NoneChannelMonitorUpdateErrZ .constructor_ok ();
130130 }
131131
132132 public Result_NoneChannelMonitorUpdateErrZ update_channel (OutPoint funding_txo , ChannelMonitorUpdate update ) {
@@ -136,7 +136,7 @@ public Result_NoneChannelMonitorUpdateErrZ update_channel(OutPoint funding_txo,
136136 Result_NoneMonitorUpdateErrorZ update_res = monitors .get (txid ).update_monitor (update , tx_broadcaster , fee_estimator , logger );
137137 assert update_res instanceof Result_NoneMonitorUpdateErrorZ .Result_NoneMonitorUpdateErrorZ_OK ;
138138 }
139- return new Result_NoneChannelMonitorUpdateErrZ .Result_NoneChannelMonitorUpdateErrZ_OK ();
139+ return Result_NoneChannelMonitorUpdateErrZ .constructor_ok ();
140140 }
141141
142142 @ Override
@@ -205,7 +205,7 @@ public Result_NoneChannelMonitorUpdateErrZ persist_new_channel(OutPoint id, Chan
205205 assert Arrays .equals (res .a .get_txid (), id .get_txid ());
206206 assert res .a .get_index () == id .get_index ();
207207 }
208- return new Result_NoneChannelMonitorUpdateErrZ .Result_NoneChannelMonitorUpdateErrZ_OK ();
208+ return Result_NoneChannelMonitorUpdateErrZ .constructor_ok ();
209209 }
210210
211211 @ Override
@@ -217,7 +217,7 @@ public Result_NoneChannelMonitorUpdateErrZ update_persisted_channel(OutPoint id,
217217 assert Arrays .equals (res .a .get_txid (), id .get_txid ());
218218 assert res .a .get_index () == id .get_index ();
219219 }
220- return new Result_NoneChannelMonitorUpdateErrZ .Result_NoneChannelMonitorUpdateErrZ_OK ();
220+ return Result_NoneChannelMonitorUpdateErrZ .constructor_ok ();
221221 }
222222 });
223223
@@ -227,8 +227,9 @@ public Result_NoneChannelMonitorUpdateErrZ update_persisted_channel(OutPoint id,
227227 @ Override public void register_tx (byte [] txid , byte [] script_pubkey ) {
228228 filter_additions .add (Arrays .toString (txid ));
229229 }
230- @ Override public void register_output (OutPoint outpoint , byte [] script_pubkey ) {
231- filter_additions .add (Arrays .toString (outpoint .get_txid ()) + ":" + outpoint .get_index ());
230+ @ Override public Option_C2Tuple_usizeTransactionZZ register_output (WatchedOutput output ) {
231+ filter_additions .add (Arrays .toString (output .get_outpoint ().get_txid ()) + ":" + output .get_outpoint ().get_index ());
232+ return Option_C2Tuple_usizeTransactionZZ .constructor_none ();
232233 }
233234 });
234235 } else {
@@ -549,12 +550,15 @@ TestState do_test_message_handler() throws InterruptedException {
549550 wait_events_processed (peer1 , peer2 );
550551
551552 peer1 .chan_manager .list_channels ();
552- ChannelDetails [] peer1_chans = peer1 .chan_manager .list_channels ();
553- ChannelDetails [] peer2_chans = peer2 .chan_manager .list_channels ();
553+ ChannelDetails [] peer1_chans = peer1 .chan_manager .list_usable_channels ();
554+ ChannelDetails [] peer2_chans = peer2 .chan_manager .list_usable_channels ();
554555 assert peer1_chans .length == 1 ;
555556 assert peer2_chans .length == 1 ;
556557 assert peer1_chans [0 ].get_channel_value_satoshis () == 10000 ;
557558 assert peer1_chans [0 ].get_is_live ();
559+ Option_u64Z short_chan_id = peer1_chans [0 ].get_short_channel_id ();
560+ assert short_chan_id instanceof Option_u64Z .Some ;
561+ assert ((Option_u64Z .Some )short_chan_id ).some == (1L << 40 ); // 0th output in the 0th transaction in the 1st block
558562 assert Arrays .equals (peer1_chans [0 ].get_channel_id (), funding .getTxId ().getReversedBytes ());
559563 assert Arrays .equals (peer2_chans [0 ].get_channel_id (), funding .getTxId ().getReversedBytes ());
560564
0 commit comments