]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Fix script order in gossip key mismatch error.
authorArik Sosman <git@arik.io>
Fri, 19 Aug 2022 17:07:55 +0000 (10:07 -0700)
committerArik Sosman <git@arik.io>
Fri, 19 Aug 2022 17:07:55 +0000 (10:07 -0700)
lightning/src/routing/gossip.rs

index 483a7bab6d97bc21ef162457a46f498b25c4a483..b083f402141f9566d1b57afbc4dd75b4937a8009 100644 (file)
@@ -1444,7 +1444,7 @@ impl<L: Deref> NetworkGraph<L> where L::Target: Logger {
                                                let expected_script =
                                                        make_funding_redeemscript(&msg.bitcoin_key_1, &msg.bitcoin_key_2).to_v0_p2wsh();
                                                if script_pubkey != expected_script {
-                                                       return Err(LightningError{err: format!("Channel announcement key ({}) didn't match on-chain script ({})", script_pubkey.to_hex(), expected_script.to_hex()), action: ErrorAction::IgnoreError});
+                                                       return Err(LightningError{err: format!("Channel announcement key ({}) didn't match on-chain script ({})", expected_script.to_hex(), script_pubkey.to_hex()), action: ErrorAction::IgnoreError});
                                                }
                                                //TODO: Check if value is worth storing, use it to inform routing, and compare it
                                                //to the new HTLC max field in channel_update
@@ -2977,7 +2977,7 @@ mod tests {
                let legacy_chan_update_info_with_none: Vec<u8> = hex::decode("2c0004000000170201010402002a060800000000000004d20801000a0d0c00040000000902040000000a0c0100").unwrap();
                let read_chan_update_info_res: Result<ChannelUpdateInfo, ::ln::msgs::DecodeError> = ::util::ser::Readable::read(&mut legacy_chan_update_info_with_none.as_slice());
                assert!(read_chan_update_info_res.is_err());
-                       
+
                // 2. Test encoding/decoding of ChannelInfo
                // Check we can encode/decode ChannelInfo without ChannelUpdateInfo fields present.
                let chan_info_none_updates = ChannelInfo {