Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions lightning/src/ln/async_signer_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ fn do_test_open_channel(zero_conf: bool) {

// Handle an inbound channel simulating an async signer.
nodes[1].disable_next_channel_signer_op(SignerOp::GetPerCommitmentPoint);
nodes[1].node.handle_open_channel(node_a_id, &open_chan_msg);

if zero_conf {
nodes[1].node.handle_open_channel(node_a_id, &open_chan_msg);
let events = nodes[1].node.get_and_clear_pending_events();
assert_eq!(events.len(), 1, "Expected one event, got {}", events.len());
match &events[0] {
Expand All @@ -90,15 +90,7 @@ fn do_test_open_channel(zero_conf: bool) {
ev => panic!("Expected OpenChannelRequest, not {:?}", ev),
}
} else {
let events = nodes[1].node.get_and_clear_pending_events();
assert_eq!(events.len(), 1, "Expected one event, got {}", events.len());
match &events[0] {
Event::OpenChannelRequest { temporary_channel_id, .. } => nodes[1]
.node
.accept_inbound_channel(temporary_channel_id, &node_a_id, 0, None)
.unwrap(),
ev => panic!("Expected OpenChannelRequest, not {:?}", ev),
}
handle_and_accept_open_channel(&nodes[1], node_a_id, &open_chan_msg);
}

let channel_id_1 = {
Expand Down Expand Up @@ -372,11 +364,9 @@ fn test_funding_signed_0conf() {

fn do_test_funding_signed_0conf(signer_ops: Vec<SignerOp>) {
// Simulate acquiring the signature for `funding_signed` asynchronously for a zero-conf channel.
let mut manually_accept_config = test_default_channel_config();

let chanmon_cfgs = create_chanmon_cfgs(2);
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, Some(manually_accept_config)]);
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, None]);
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
let node_a_id = nodes[0].node.get_our_node_id();
let node_b_id = nodes[1].node.get_our_node_id();
Expand Down
4 changes: 1 addition & 3 deletions lightning/src/ln/priv_short_conf_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1396,9 +1396,7 @@ fn test_connect_before_funding() {
let chanmon_cfgs = create_chanmon_cfgs(2);
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);

let mut manually_accept_conf = test_default_channel_config();

let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, Some(manually_accept_conf)]);
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, None]);
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
let node_a_id = nodes[0].node.get_our_node_id();
let node_b_id = nodes[1].node.get_our_node_id();
Expand Down
4 changes: 2 additions & 2 deletions lightning/src/ln/reorg_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ fn test_htlc_preimage_claim_holder_commitment_after_counterparty_commitment_reor
let chanmon_cfgs = create_chanmon_cfgs(2);
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
let legacy_cfg = test_legacy_channel_config();
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(legacy_cfg), None, None]);
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(legacy_cfg), None]);
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);

let (_, _, chan_id, funding_tx) = create_announced_chan_between_nodes(&nodes, 0, 1);
Expand Down Expand Up @@ -762,7 +762,7 @@ fn test_htlc_preimage_claim_prev_counterparty_commitment_after_current_counterpa
let chanmon_cfgs = create_chanmon_cfgs(2);
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
let legacy_cfg = test_legacy_channel_config();
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(legacy_cfg), None, None]);
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(legacy_cfg), None]);
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);

let (_, _, chan_id, funding_tx) = create_announced_chan_between_nodes(&nodes, 0, 1);
Expand Down
18 changes: 6 additions & 12 deletions lightning/src/ln/splicing_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1081,8 +1081,7 @@ fn do_test_splice_commitment_broadcast(splice_status: SpliceStatus, claim_htlcs:
// Tests that we're able to enforce HTLCs onchain during the different stages of a splice.
let chanmon_cfgs = create_chanmon_cfgs(2);
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
let config = test_default_channel_config();
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(config.clone()), Some(config)]);
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, None]);
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);

let node_id_0 = nodes[0].node.get_our_node_id();
Expand Down Expand Up @@ -1833,8 +1832,7 @@ fn do_test_propose_splice_while_disconnected(reload: bool, use_0conf: bool) {
fn disconnect_on_unexpected_interactive_tx_message() {
let chanmon_cfgs = create_chanmon_cfgs(2);
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
let config = test_default_channel_config();
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(config.clone()), Some(config)]);
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, None]);
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);

let initiator = &nodes[0];
Expand Down Expand Up @@ -1872,8 +1870,7 @@ fn disconnect_on_unexpected_interactive_tx_message() {
fn fail_splice_on_interactive_tx_error() {
let chanmon_cfgs = create_chanmon_cfgs(2);
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
let config = test_default_channel_config();
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(config.clone()), Some(config)]);
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, None]);
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);

let initiator = &nodes[0];
Expand Down Expand Up @@ -1926,8 +1923,7 @@ fn fail_splice_on_interactive_tx_error() {
fn fail_splice_on_tx_abort() {
let chanmon_cfgs = create_chanmon_cfgs(2);
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
let config = test_default_channel_config();
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(config.clone()), Some(config)]);
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, None]);
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);

let initiator = &nodes[0];
Expand Down Expand Up @@ -1980,8 +1976,7 @@ fn fail_splice_on_tx_abort() {
fn fail_splice_on_channel_close() {
let chanmon_cfgs = create_chanmon_cfgs(2);
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
let config = test_default_channel_config();
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(config.clone()), Some(config)]);
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, None]);
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);

let initiator = &nodes[0];
Expand Down Expand Up @@ -2031,8 +2026,7 @@ fn fail_splice_on_channel_close() {
fn fail_quiescent_action_on_channel_close() {
let chanmon_cfgs = create_chanmon_cfgs(2);
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
let config = test_default_channel_config();
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(config.clone()), Some(config)]);
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, None]);
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);

let initiator = &nodes[0];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
differentiate between an inbound request for a dual-funded (V2) or non-dual-funded (V1) channel to be
opened, with value being either of the enum variants `InboundChannelFunds::DualFunded` and
`InboundChannelFunds::PushMsat(u64)` corresponding to V2 and V1 channel open requests respectively.
* If `manually_accept_inbound_channels` is false, then V2 channels will be accepted automatically; the
same behaviour as V1 channels. Otherwise, `ChannelManager::accept_inbound_channel()` can also be used
to manually accept an inbound V2 channel.
* Similar to V1 channels, `ChannelManager::accept_inbound_channel()` can also be used
to accept an inbound V2 channel.
* 0conf dual-funded channels are not supported.
* RBF of dual-funded channel funding transactions is not supported.

Loading