]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Use correct node in `test_invalid_upfront_shutdown_script`
authorViktor Tigerström <11711198+ViktorTigerstrom@users.noreply.github.com>
Tue, 3 Jan 2023 09:52:41 +0000 (10:52 +0100)
committerViktor Tigerström <11711198+ViktorTigerstrom@users.noreply.github.com>
Mon, 9 Jan 2023 22:50:41 +0000 (23:50 +0100)
lightning/src/ln/shutdown_tests.rs

index f88d1d243bd3039251221e8a127b053aa4b6aa54..60d5dc85cd2742a8a81e0d8d44d95752e4c70bc1 100644 (file)
@@ -557,13 +557,13 @@ fn test_invalid_upfront_shutdown_script() {
        open_channel.shutdown_scriptpubkey = Present(Builder::new().push_int(0)
                .push_slice(&[0, 0])
                .into_script());
-       nodes[0].node.handle_open_channel(&nodes[0].node.get_our_node_id(), channelmanager::provided_init_features(), &open_channel);
+       nodes[0].node.handle_open_channel(&nodes[1].node.get_our_node_id(), channelmanager::provided_init_features(), &open_channel);
 
        let events = nodes[0].node.get_and_clear_pending_msg_events();
        assert_eq!(events.len(), 1);
        match events[0] {
                MessageSendEvent::HandleError { action: ErrorAction::SendErrorMessage { ref msg }, node_id } => {
-                       assert_eq!(node_id, nodes[0].node.get_our_node_id());
+                       assert_eq!(node_id, nodes[1].node.get_our_node_id());
                        assert_eq!(msg.data, "Peer is signaling upfront_shutdown but has provided an unacceptable scriptpubkey format: Script(OP_0 OP_PUSHBYTES_2 0000)");
                },
                _ => panic!("Unexpected event"),