let raa_msg = msgs::RevokeAndACK {
channel_id: chan.2,
per_commitment_secret: local_secret,
- next_per_commitment_point: next_local_point
+ next_per_commitment_point: next_local_point,
+ #[cfg(taproot)]
+ next_local_nonce: None,
};
nodes[1].node.handle_revoke_and_ack(&nodes[0].node.get_our_node_id(), &raa_msg);
}
nodes[1].node.handle_revoke_and_ack(&nodes[0].node.get_our_node_id(),
- &msgs::RevokeAndACK { channel_id, per_commitment_secret, next_per_commitment_point });
+ &msgs::RevokeAndACK {
+ channel_id,
+ per_commitment_secret,
+ next_per_commitment_point,
+ #[cfg(taproot)]
+ next_local_nonce: None,
+ });
assert_eq!(check_closed_broadcast!(nodes[1], true).unwrap().data, "Received an unexpected revoke_and_ack");
check_added_monitors!(nodes[1], 1);
check_closed_event!(nodes[1], 1, ClosureReason::ProcessingError { err: "Received an unexpected revoke_and_ack".to_string() });
pub per_commitment_secret: [u8; 32],
/// The next sender-broadcast commitment transaction's per-commitment point
pub next_per_commitment_point: PublicKey,
+ #[cfg(taproot)]
+ /// Musig nonce the recipient should use in their next commitment signature message
+ pub next_local_nonce: Option<musig2::types::PublicNonce>
}
/// An [`update_fee`] message to be sent to or received from a peer
(1, channel_type, option),
});
+#[cfg(not(taproot))]
impl_writeable_msg!(RevokeAndACK, {
channel_id,
per_commitment_secret,
next_per_commitment_point
}, {});
+#[cfg(taproot)]
+impl_writeable_msg!(RevokeAndACK, {
+ channel_id,
+ per_commitment_secret,
+ next_per_commitment_point
+}, {
+ (4, next_local_nonce, option)
+});
+
impl_writeable_msg!(Shutdown, {
channel_id,
scriptpubkey
channel_id: [2; 32],
per_commitment_secret: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
next_per_commitment_point: pubkey_1,
+ #[cfg(taproot)]
+ next_local_nonce: None,
};
let encoded_value = raa.encode();
let target_value = hex::decode("02020202020202020202020202020202020202020202020202020202020202020101010101010101010101010101010101010101010101010101010101010101031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f").unwrap();