Skip to content

Commit 19536c6

Browse files
authored
Merge pull request #1676 from arik-so/2022-08-gossip-error-message-fix
Fix script order in gossip key mismatch error.
2 parents 49a0233 + f53492e commit 19536c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lightning/src/routing/gossip.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1444,7 +1444,7 @@ impl<L: Deref> NetworkGraph<L> where L::Target: Logger {
14441444
let expected_script =
14451445
make_funding_redeemscript(&msg.bitcoin_key_1, &msg.bitcoin_key_2).to_v0_p2wsh();
14461446
if script_pubkey != expected_script {
1447-
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});
1447+
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});
14481448
}
14491449
//TODO: Check if value is worth storing, use it to inform routing, and compare it
14501450
//to the new HTLC max field in channel_update
@@ -2977,7 +2977,7 @@ mod tests {
29772977
let legacy_chan_update_info_with_none: Vec<u8> = hex::decode("2c0004000000170201010402002a060800000000000004d20801000a0d0c00040000000902040000000a0c0100").unwrap();
29782978
let read_chan_update_info_res: Result<ChannelUpdateInfo, ::ln::msgs::DecodeError> = ::util::ser::Readable::read(&mut legacy_chan_update_info_with_none.as_slice());
29792979
assert!(read_chan_update_info_res.is_err());
2980-
2980+
29812981
// 2. Test encoding/decoding of ChannelInfo
29822982
// Check we can encode/decode ChannelInfo without ChannelUpdateInfo fields present.
29832983
let chan_info_none_updates = ChannelInfo {

0 commit comments

Comments
 (0)