Skip to content

Commit b886679

Browse files
committed
Allow get_per_commitment_point to fail.
This changes `ChannelSigner::get_per_commitment_point` to return a `Result<PublicKey, ()`, which means that it can fail. Similarly, it changes `ChannelSigner::release_commitment_secret`. In order to accomodate failure at the callsites that otherwise assumed it was infallible, we cache the next per-commitment point each time the state advances in the `ChannelContext` and change the callsites to instead use the cached value.
1 parent 1f2ee21 commit b886679

File tree

8 files changed

+392
-61
lines changed

8 files changed

+392
-61
lines changed

lightning/src/chain/channelmonitor.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2752,9 +2752,7 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitorImpl<Signer> {
27522752
},
27532753
commitment_txid: htlc.commitment_txid,
27542754
per_commitment_number: htlc.per_commitment_number,
2755-
per_commitment_point: self.onchain_tx_handler.signer.get_per_commitment_point(
2756-
htlc.per_commitment_number, &self.onchain_tx_handler.secp_ctx,
2757-
),
2755+
per_commitment_point: htlc.per_commitment_point,
27582756
htlc: htlc.htlc,
27592757
preimage: htlc.preimage,
27602758
counterparty_sig: htlc.counterparty_sig,

lightning/src/chain/onchaintx.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ pub(crate) struct ExternalHTLCClaim {
179179
pub(crate) htlc: HTLCOutputInCommitment,
180180
pub(crate) preimage: Option<PaymentPreimage>,
181181
pub(crate) counterparty_sig: Signature,
182+
pub(crate) per_commitment_point: bitcoin::secp256k1::PublicKey,
182183
}
183184

184185
// Represents the different types of claims for which events are yielded externally to satisfy said
@@ -1188,9 +1189,16 @@ impl<ChannelSigner: WriteableEcdsaChannelSigner> OnchainTxHandler<ChannelSigner>
11881189
})
11891190
.map(|(htlc_idx, htlc)| {
11901191
let counterparty_htlc_sig = holder_commitment.counterparty_htlc_sigs[htlc_idx];
1192+
1193+
// TODO(waterson) fallible: move this somewhere!
1194+
let per_commitment_point = self.signer.get_per_commitment_point(
1195+
trusted_tx.commitment_number(), &self.secp_ctx,
1196+
).unwrap();
1197+
11911198
ExternalHTLCClaim {
11921199
commitment_txid: trusted_tx.txid(),
11931200
per_commitment_number: trusted_tx.commitment_number(),
1201+
per_commitment_point: per_commitment_point,
11941202
htlc: htlc.clone(),
11951203
preimage: *preimage,
11961204
counterparty_sig: counterparty_htlc_sig,

lightning/src/ln/channel.rs

Lines changed: 111 additions & 37 deletions
Large diffs are not rendered by default.

lightning/src/ln/channelmanager.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5622,6 +5622,12 @@ where
56225622
Some(inbound_chan) => {
56235623
match inbound_chan.funding_created(msg, best_block, &self.signer_provider, &self.logger) {
56245624
Ok(res) => res,
5625+
Err((inbound_chan, ChannelError::Ignore(_))) => {
5626+
// If we get an `Ignore` error then something transient went wrong. Put the channel
5627+
// back into the table and bail.
5628+
peer_state.inbound_v1_channel_by_id.insert(msg.temporary_channel_id, inbound_chan);
5629+
return Ok(());
5630+
},
56255631
Err((mut inbound_chan, err)) => {
56265632
// We've already removed this inbound channel from the map in `PeerState`
56275633
// above so at this point we just need to clean up any lingering entries

lightning/src/ln/functional_test_utils.rs

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ use crate::util::test_utils;
2929
use crate::util::test_utils::{panicking, TestChainMonitor, TestScorer, TestKeysInterface};
3030
use crate::util::errors::APIError;
3131
use crate::util::config::{UserConfig, MaxDustHTLCExposure};
32+
use crate::util::logger::Logger;
3233
use crate::util::ser::{ReadableArgs, Writeable};
3334

3435
use bitcoin::blockdata::block::{Block, BlockHeader};
@@ -414,6 +415,31 @@ impl<'a, 'b, 'c> Node<'a, 'b, 'c> {
414415
pub fn get_block_header(&self, height: u32) -> BlockHeader {
415416
self.blocks.lock().unwrap()[height as usize].0.header
416417
}
418+
/// Changes the channel signer's availability for the specified peer and channel.
419+
///
420+
/// When `available` is set to `true`, the channel signer will behave normally. When set to
421+
/// `false`, the channel signer will act like an off-line remote signer and will return
422+
/// `SignerError::NotAvailable` for several of the signing methods. Currently, only
423+
/// `get_per_commitment_point` and `release_commitment_secret` are affected by this setting.
424+
#[cfg(test)]
425+
pub fn set_channel_signer_available(&self, peer_id: &PublicKey, chan_id: &ChannelId, available: bool) {
426+
let per_peer_state = self.node.per_peer_state.read().unwrap();
427+
let chan_lock = per_peer_state.get(peer_id).unwrap().lock().unwrap();
428+
let signer = (|| {
429+
if let Some(local_chan) = chan_lock.channel_by_id.get(chan_id) {
430+
return local_chan.get_signer();
431+
}
432+
if let Some(local_chan) = chan_lock.inbound_v1_channel_by_id.get(chan_id) {
433+
return local_chan.context.get_signer();
434+
}
435+
if let Some(local_chan) = chan_lock.outbound_v1_channel_by_id.get(chan_id) {
436+
return local_chan.context.get_signer();
437+
}
438+
panic!("Couldn't find a channel with id {}", chan_id);
439+
})();
440+
log_debug!(self.logger, "Setting channel {} as available={}", chan_id, available);
441+
signer.as_ecdsa().unwrap().set_available(available);
442+
}
417443
}
418444

419445
/// If we need an unsafe pointer to a `Node` (ie to reference it in a thread
@@ -2031,12 +2057,13 @@ macro_rules! expect_channel_shutdown_state {
20312057
}
20322058

20332059
#[cfg(any(test, ldk_bench, feature = "_test_utils"))]
2034-
pub fn expect_channel_pending_event<'a, 'b, 'c, 'd>(node: &'a Node<'b, 'c, 'd>, expected_counterparty_node_id: &PublicKey) {
2060+
pub fn expect_channel_pending_event<'a, 'b, 'c, 'd>(node: &'a Node<'b, 'c, 'd>, expected_counterparty_node_id: &PublicKey) -> ChannelId {
20352061
let events = node.node.get_and_clear_pending_events();
20362062
assert_eq!(events.len(), 1);
2037-
match events[0] {
2038-
crate::events::Event::ChannelPending { ref counterparty_node_id, .. } => {
2063+
match &events[0] {
2064+
crate::events::Event::ChannelPending { channel_id, counterparty_node_id, .. } => {
20392065
assert_eq!(*expected_counterparty_node_id, *counterparty_node_id);
2066+
*channel_id
20402067
},
20412068
_ => panic!("Unexpected event"),
20422069
}

lightning/src/ln/functional_tests.rs

Lines changed: 194 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ fn test_update_fee_that_funder_cannot_afford() {
714714
let chan_signer = remote_chan.get_signer();
715715
let pubkeys = chan_signer.as_ref().pubkeys();
716716
(pubkeys.delayed_payment_basepoint, pubkeys.htlc_basepoint,
717-
chan_signer.as_ref().get_per_commitment_point(INITIAL_COMMITMENT_NUMBER - 1, &secp_ctx),
717+
chan_signer.as_ref().get_per_commitment_point(INITIAL_COMMITMENT_NUMBER - 1, &secp_ctx).unwrap(),
718718
pubkeys.funding_pubkey)
719719
};
720720

@@ -1421,8 +1421,8 @@ fn test_fee_spike_violation_fails_htlc() {
14211421

14221422
let pubkeys = chan_signer.as_ref().pubkeys();
14231423
(pubkeys.revocation_basepoint, pubkeys.htlc_basepoint,
1424-
chan_signer.as_ref().release_commitment_secret(INITIAL_COMMITMENT_NUMBER),
1425-
chan_signer.as_ref().get_per_commitment_point(INITIAL_COMMITMENT_NUMBER - 2, &secp_ctx),
1424+
chan_signer.as_ref().release_commitment_secret(INITIAL_COMMITMENT_NUMBER).unwrap(),
1425+
chan_signer.as_ref().get_per_commitment_point(INITIAL_COMMITMENT_NUMBER - 2, &secp_ctx).unwrap(),
14261426
chan_signer.as_ref().pubkeys().funding_pubkey)
14271427
};
14281428
let (remote_delayed_payment_basepoint, remote_htlc_basepoint, remote_point, remote_funding) = {
@@ -1432,7 +1432,7 @@ fn test_fee_spike_violation_fails_htlc() {
14321432
let chan_signer = remote_chan.get_signer();
14331433
let pubkeys = chan_signer.as_ref().pubkeys();
14341434
(pubkeys.delayed_payment_basepoint, pubkeys.htlc_basepoint,
1435-
chan_signer.as_ref().get_per_commitment_point(INITIAL_COMMITMENT_NUMBER - 1, &secp_ctx),
1435+
chan_signer.as_ref().get_per_commitment_point(INITIAL_COMMITMENT_NUMBER - 1, &secp_ctx).unwrap(),
14361436
chan_signer.as_ref().pubkeys().funding_pubkey)
14371437
};
14381438

@@ -7660,15 +7660,15 @@ fn test_counterparty_raa_skip_no_crash() {
76607660

76617661
// Make signer believe we got a counterparty signature, so that it allows the revocation
76627662
keys.as_ecdsa().unwrap().get_enforcement_state().last_holder_commitment -= 1;
7663-
per_commitment_secret = keys.as_ref().release_commitment_secret(INITIAL_COMMITMENT_NUMBER);
7663+
per_commitment_secret = keys.as_ref().release_commitment_secret(INITIAL_COMMITMENT_NUMBER).unwrap();
76647664

76657665
// Must revoke without gaps
76667666
keys.as_ecdsa().unwrap().get_enforcement_state().last_holder_commitment -= 1;
7667-
keys.as_ref().release_commitment_secret(INITIAL_COMMITMENT_NUMBER - 1);
7667+
keys.as_ref().release_commitment_secret(INITIAL_COMMITMENT_NUMBER - 1).expect("unable to release commitment secret");
76687668

76697669
keys.as_ecdsa().unwrap().get_enforcement_state().last_holder_commitment -= 1;
76707670
next_per_commitment_point = PublicKey::from_secret_key(&Secp256k1::new(),
7671-
&SecretKey::from_slice(&keys.as_ref().release_commitment_secret(INITIAL_COMMITMENT_NUMBER - 2)).unwrap());
7671+
&SecretKey::from_slice(&keys.as_ref().release_commitment_secret(INITIAL_COMMITMENT_NUMBER - 2).unwrap()).unwrap());
76727672
}
76737673

76747674
nodes[1].node.handle_revoke_and_ack(&nodes[0].node.get_our_node_id(),
@@ -8979,6 +8979,193 @@ fn test_duplicate_chan_id() {
89798979
send_payment(&nodes[0], &[&nodes[1]], 8000000);
89808980
}
89818981

8982+
#[test]
8983+
fn test_signer_gpcp_unavailable_for_funding_signed() {
8984+
// Test that a transient failure of the Signer's get_per_commitment_point can be tolerated during
8985+
// channel open by specifically having it fail for an inbound channel during the handling of the
8986+
// funding_signed message.
8987+
let chanmon_cfgs = create_chanmon_cfgs(2);
8988+
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
8989+
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, None]);
8990+
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
8991+
8992+
// Create an initial channel
8993+
nodes[0].node.create_channel(nodes[1].node.get_our_node_id(), 100000, 10001, 42, None).unwrap();
8994+
let mut open_chan_msg = get_event_msg!(nodes[0], MessageSendEvent::SendOpenChannel, nodes[1].node.get_our_node_id());
8995+
nodes[1].node.handle_open_channel(&nodes[0].node.get_our_node_id(), &open_chan_msg);
8996+
nodes[0].node.handle_accept_channel(&nodes[1].node.get_our_node_id(), &get_event_msg!(nodes[1], MessageSendEvent::SendAcceptChannel, nodes[0].node.get_our_node_id()));
8997+
8998+
// Move the channel through the funding flow...
8999+
let (temporary_channel_id, tx, _) = create_funding_transaction(&nodes[0], &nodes[1].node.get_our_node_id(), 100000, 42);
9000+
9001+
nodes[0].node.funding_transaction_generated(&temporary_channel_id, &nodes[1].node.get_our_node_id(), tx.clone()).unwrap();
9002+
check_added_monitors(&nodes[0], 0);
9003+
9004+
let mut funding_created_msg = get_event_msg!(nodes[0], MessageSendEvent::SendFundingCreated, nodes[1].node.get_our_node_id());
9005+
nodes[1].node.handle_funding_created(&nodes[0].node.get_our_node_id(), &funding_created_msg);
9006+
check_added_monitors(&nodes[1], 1);
9007+
9008+
let chan_id = expect_channel_pending_event(&nodes[1], &nodes[0].node.get_our_node_id());
9009+
9010+
// Tweak the node[0] channel signer to produce an "unavailable" message before we ask it to handle
9011+
// the funding_signed message.
9012+
nodes[0].set_channel_signer_available(&nodes[1].node.get_our_node_id(), &chan_id, false);
9013+
let funding_signed_msg = get_event_msg!(nodes[1], MessageSendEvent::SendFundingSigned, nodes[0].node.get_our_node_id());
9014+
nodes[0].node.handle_funding_signed(&nodes[1].node.get_our_node_id(), &funding_signed_msg);
9015+
9016+
let events = nodes[0].node.get_and_clear_pending_events();
9017+
assert_eq!(events.len(), 0);
9018+
check_added_monitors(&nodes[0], 0);
9019+
9020+
// Now make it available and verify that we can process the message.
9021+
nodes[0].set_channel_signer_available(&nodes[1].node.get_our_node_id(), &chan_id, true);
9022+
nodes[0].node.handle_funding_signed(&nodes[1].node.get_our_node_id(), &funding_signed_msg);
9023+
check_added_monitors(&nodes[0], 1);
9024+
9025+
expect_channel_pending_event(&nodes[0], &nodes[1].node.get_our_node_id());
9026+
9027+
assert_eq!(nodes[0].tx_broadcaster.txn_broadcasted.lock().unwrap().len(), 1);
9028+
assert_eq!(nodes[0].tx_broadcaster.txn_broadcasted.lock().unwrap()[0], tx);
9029+
9030+
let (channel_ready, _) = create_chan_between_nodes_with_value_confirm(&nodes[0], &nodes[1], &tx);
9031+
let (announcement, as_update, bs_update) = create_chan_between_nodes_with_value_b(&nodes[0], &nodes[1], &channel_ready);
9032+
update_nodes_with_chan_announce(&nodes, 0, 1, &announcement, &as_update, &bs_update);
9033+
9034+
send_payment(&nodes[0], &[&nodes[1]], 8000000);
9035+
}
9036+
9037+
#[test]
9038+
fn test_signer_gpcp_unavailable_for_funding_created() {
9039+
// Test that a transient failure of the Signer's get_per_commitment_point can be tolerated during
9040+
// channel open by specifically having it fail for an outbound channel during generation of the
9041+
// funding_created message.
9042+
let chanmon_cfgs = create_chanmon_cfgs(2);
9043+
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
9044+
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, None]);
9045+
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
9046+
9047+
// Create an initial channel
9048+
nodes[0].node.create_channel(nodes[1].node.get_our_node_id(), 100000, 10001, 42, None).unwrap();
9049+
let mut open_chan_msg = get_event_msg!(nodes[0], MessageSendEvent::SendOpenChannel, nodes[1].node.get_our_node_id());
9050+
nodes[1].node.handle_open_channel(&nodes[0].node.get_our_node_id(), &open_chan_msg);
9051+
nodes[0].node.handle_accept_channel(&nodes[1].node.get_our_node_id(), &get_event_msg!(nodes[1], MessageSendEvent::SendAcceptChannel, nodes[0].node.get_our_node_id()));
9052+
9053+
// Move the channel through the funding flow...
9054+
let (temporary_channel_id, tx, _) = create_funding_transaction(&nodes[0], &nodes[1].node.get_our_node_id(), 100000, 42);
9055+
9056+
nodes[0].node.funding_transaction_generated(&temporary_channel_id, &nodes[1].node.get_our_node_id(), tx.clone()).unwrap();
9057+
check_added_monitors(&nodes[0], 0);
9058+
9059+
// Tweak the node[1] channel signer to produce an "unavailable" result before we ask it to handle
9060+
// the funding_created message.
9061+
nodes[1].set_channel_signer_available(&nodes[0].node.get_our_node_id(), &temporary_channel_id, false);
9062+
let mut funding_created_msg = get_event_msg!(nodes[0], MessageSendEvent::SendFundingCreated, nodes[1].node.get_our_node_id());
9063+
nodes[1].node.handle_funding_created(&nodes[0].node.get_our_node_id(), &funding_created_msg);
9064+
check_added_monitors(&nodes[1], 0);
9065+
9066+
let events = nodes[0].node.get_and_clear_pending_events();
9067+
assert_eq!(events.len(), 0);
9068+
9069+
// Now make it available and verify that we can process the message.
9070+
nodes[1].set_channel_signer_available(&nodes[0].node.get_our_node_id(), &temporary_channel_id, true);
9071+
nodes[1].node.handle_funding_created(&nodes[0].node.get_our_node_id(), &funding_created_msg);
9072+
check_added_monitors(&nodes[1], 1);
9073+
9074+
let funding_signed_msg = get_event_msg!(nodes[1], MessageSendEvent::SendFundingSigned, nodes[0].node.get_our_node_id());
9075+
nodes[0].node.handle_funding_signed(&nodes[1].node.get_our_node_id(), &funding_signed_msg);
9076+
check_added_monitors(&nodes[0], 1);
9077+
9078+
expect_channel_pending_event(&nodes[0], &nodes[1].node.get_our_node_id());
9079+
expect_channel_pending_event(&nodes[1], &nodes[0].node.get_our_node_id());
9080+
9081+
assert_eq!(nodes[0].tx_broadcaster.txn_broadcasted.lock().unwrap().len(), 1);
9082+
assert_eq!(nodes[0].tx_broadcaster.txn_broadcasted.lock().unwrap()[0], tx);
9083+
9084+
let (channel_ready, _) = create_chan_between_nodes_with_value_confirm(&nodes[0], &nodes[1], &tx);
9085+
let (announcement, as_update, bs_update) = create_chan_between_nodes_with_value_b(&nodes[0], &nodes[1], &channel_ready);
9086+
update_nodes_with_chan_announce(&nodes, 0, 1, &announcement, &as_update, &bs_update);
9087+
send_payment(&nodes[0], &[&nodes[1]], 8000000);
9088+
}
9089+
9090+
#[test]
9091+
fn test_dest_signer_gpcp_unavailable_for_commitment_signed() {
9092+
// Test that a transient failure of the Signer's get_per_commitment_point can be tolerated by the
9093+
// destination node for a payment.
9094+
let chanmon_cfgs = create_chanmon_cfgs(2);
9095+
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
9096+
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, None]);
9097+
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
9098+
9099+
// Create an initial channel
9100+
nodes[0].node.create_channel(nodes[1].node.get_our_node_id(), 100000, 10001, 42, None).unwrap();
9101+
let mut open_chan_msg = get_event_msg!(nodes[0], MessageSendEvent::SendOpenChannel, nodes[1].node.get_our_node_id());
9102+
nodes[1].node.handle_open_channel(&nodes[0].node.get_our_node_id(), &open_chan_msg);
9103+
nodes[0].node.handle_accept_channel(&nodes[1].node.get_our_node_id(), &get_event_msg!(nodes[1], MessageSendEvent::SendAcceptChannel, nodes[0].node.get_our_node_id()));
9104+
9105+
// Move the channel through the funding flow...
9106+
let (temporary_channel_id, tx, _) = create_funding_transaction(&nodes[0], &nodes[1].node.get_our_node_id(), 100000, 42);
9107+
9108+
nodes[0].node.funding_transaction_generated(&temporary_channel_id, &nodes[1].node.get_our_node_id(), tx.clone()).unwrap();
9109+
check_added_monitors(&nodes[0], 0);
9110+
9111+
let mut funding_created_msg = get_event_msg!(nodes[0], MessageSendEvent::SendFundingCreated, nodes[1].node.get_our_node_id());
9112+
nodes[1].node.handle_funding_created(&nodes[0].node.get_our_node_id(), &funding_created_msg);
9113+
check_added_monitors(&nodes[1], 1);
9114+
9115+
let funding_signed_msg = get_event_msg!(nodes[1], MessageSendEvent::SendFundingSigned, nodes[0].node.get_our_node_id());
9116+
nodes[0].node.handle_funding_signed(&nodes[1].node.get_our_node_id(), &funding_signed_msg);
9117+
check_added_monitors(&nodes[0], 1);
9118+
9119+
let chan_id = expect_channel_pending_event(&nodes[0], &nodes[1].node.get_our_node_id());
9120+
expect_channel_pending_event(&nodes[1], &nodes[0].node.get_our_node_id());
9121+
9122+
assert_eq!(nodes[0].tx_broadcaster.txn_broadcasted.lock().unwrap().len(), 1);
9123+
assert_eq!(nodes[0].tx_broadcaster.txn_broadcasted.lock().unwrap()[0], tx);
9124+
9125+
let (channel_ready, _) = create_chan_between_nodes_with_value_confirm(&nodes[0], &nodes[1], &tx);
9126+
let (announcement, as_update, bs_update) = create_chan_between_nodes_with_value_b(&nodes[0], &nodes[1], &channel_ready);
9127+
update_nodes_with_chan_announce(&nodes, 0, 1, &announcement, &as_update, &bs_update);
9128+
9129+
// Send a payment.
9130+
let src = &nodes[0];
9131+
let dst = &nodes[1];
9132+
let (route, our_payment_hash, _our_payment_preimage, our_payment_secret) = get_route_and_payment_hash!(src, dst, 8000000);
9133+
src.node.send_payment_with_route(&route, our_payment_hash,
9134+
RecipientOnionFields::secret_only(our_payment_secret), PaymentId(our_payment_hash.0)).unwrap();
9135+
check_added_monitors!(src, 1);
9136+
9137+
// Pass the payment along the route.
9138+
let payment_event = {
9139+
let mut events = src.node.get_and_clear_pending_msg_events();
9140+
assert_eq!(events.len(), 1);
9141+
SendEvent::from_event(events.remove(0))
9142+
};
9143+
assert_eq!(payment_event.node_id, dst.node.get_our_node_id());
9144+
assert_eq!(payment_event.msgs.len(), 1);
9145+
9146+
dst.node.handle_update_add_htlc(&src.node.get_our_node_id(), &payment_event.msgs[0]);
9147+
9148+
// Mark dst's signer as unavailable.
9149+
dst.set_channel_signer_available(&src.node.get_our_node_id(), &chan_id, false);
9150+
dst.node.handle_commitment_signed(&src.node.get_our_node_id(), &payment_event.commitment_msg);
9151+
check_added_monitors(src, 0);
9152+
check_added_monitors(dst, 0);
9153+
9154+
{
9155+
let src_events = src.node.get_and_clear_pending_msg_events();
9156+
assert_eq!(src_events.len(), 0);
9157+
let dst_events = dst.node.get_and_clear_pending_msg_events();
9158+
assert_eq!(dst_events.len(), 0);
9159+
}
9160+
9161+
// Mark dst's signer as available and re-handle commitment_signed. We expect to see both the RAA
9162+
// and the CS.
9163+
dst.set_channel_signer_available(&src.node.get_our_node_id(), &chan_id, true);
9164+
dst.node.handle_commitment_signed(&src.node.get_our_node_id(), &payment_event.commitment_msg);
9165+
get_revoke_commit_msgs(dst, &src.node.get_our_node_id());
9166+
check_added_monitors!(dst, 1);
9167+
}
9168+
89829169
#[test]
89839170
fn test_error_chans_closed() {
89849171
// Test that we properly handle error messages, closing appropriate channels.

0 commit comments

Comments
 (0)