From: Matt Corallo Date: Fri, 9 Nov 2018 04:31:53 +0000 (+1030) Subject: Split up channel_monitor_network_test a little bit X-Git-Tag: v0.0.12~274^2 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=44f56f84b6dab5be3cfe3c65e2a96700ea90ce27;p=rust-lightning Split up channel_monitor_network_test a little bit --- diff --git a/src/ln/channelmanager.rs b/src/ln/channelmanager.rs index 8d31c3347..e43b68566 100644 --- a/src/ln/channelmanager.rs +++ b/src/ln/channelmanager.rs @@ -5708,7 +5708,13 @@ mod tests { get_announce_close_broadcast_events(&nodes, 3, 4); assert_eq!(nodes[3].node.list_channels().len(), 0); assert_eq!(nodes[4].node.list_channels().len(), 0); + } + + #[test] + fn test_justice_tx() { + // Test justice txn built on revoked HTLC-Success tx, against both sides + let nodes = create_network(2); // Create some new channels: let chan_5 = create_announced_chan_between_nodes(&nodes, 0, 1); @@ -5748,6 +5754,9 @@ mod tests { } get_announce_close_broadcast_events(&nodes, 0, 1); + assert_eq!(nodes[0].node.list_channels().len(), 0); + assert_eq!(nodes[1].node.list_channels().len(), 0); + // We test justice_tx build by A on B's revoked HTLC-Success tx // Create some new channels: let chan_6 = create_announced_chan_between_nodes(&nodes, 0, 1);