Merge pull request #1676 from arik-so/2022-08-gossip-error-message-fix

Fix script order in gossip key mismatch error.
This commit is contained in:
Matt Corallo 2022-08-19 19:03:08 +00:00 committed by GitHub
commit 19536c6433
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1444,7 +1444,7 @@ impl<L: Deref> NetworkGraph<L> where L::Target: Logger {
let expected_script = let expected_script =
make_funding_redeemscript(&msg.bitcoin_key_1, &msg.bitcoin_key_2).to_v0_p2wsh(); make_funding_redeemscript(&msg.bitcoin_key_1, &msg.bitcoin_key_2).to_v0_p2wsh();
if script_pubkey != expected_script { 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 //TODO: Check if value is worth storing, use it to inform routing, and compare it
//to the new HTLC max field in channel_update //to the new HTLC max field in channel_update