From: Viktor Tigerström <11711198+ViktorTigerstrom@users.noreply.github.com> Date: Tue, 3 Jan 2023 09:52:41 +0000 (+0100) Subject: Use correct node in `test_invalid_upfront_shutdown_script` X-Git-Tag: v0.0.114-beta~67^2~3 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=228fbc2f32a476fb9804e5205795750ae6227efc;p=rust-lightning Use correct node in `test_invalid_upfront_shutdown_script` --- diff --git a/lightning/src/ln/shutdown_tests.rs b/lightning/src/ln/shutdown_tests.rs index f88d1d243..60d5dc85c 100644 --- a/lightning/src/ln/shutdown_tests.rs +++ b/lightning/src/ln/shutdown_tests.rs @@ -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"),