mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-24 23:08:36 +01:00
Add force_close_channel call command to full_stack_target
This commit is contained in:
parent
f71ff8f0ac
commit
673912e769
1 changed files with 7 additions and 0 deletions
|
@ -403,6 +403,13 @@ pub fn do_test(data: &[u8], logger: &Arc<Logger>) {
|
||||||
13 => {
|
13 => {
|
||||||
loss_detector.disconnect_block();
|
loss_detector.disconnect_block();
|
||||||
},
|
},
|
||||||
|
14 => {
|
||||||
|
let mut channels = channelmanager.list_channels();
|
||||||
|
let channel_id = get_slice!(1)[0] as usize;
|
||||||
|
if channel_id >= channels.len() { return; }
|
||||||
|
channels.sort_by(|a, b| { a.channel_id.cmp(&b.channel_id) });
|
||||||
|
channelmanager.force_close_channel(&channels[channel_id].channel_id);
|
||||||
|
},
|
||||||
_ => return,
|
_ => return,
|
||||||
}
|
}
|
||||||
loss_detector.handler.process_events();
|
loss_detector.handler.process_events();
|
||||||
|
|
Loading…
Add table
Reference in a new issue