You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check P2WPKH script against expected before gen'ing an output event
This fixes a bug in 3518f1f where
we may generate an output event for a P2WPKH output which is not
ours if the transaction has a sequence/lock_time combination which
false-positives our remote tx detection.
Also note that the TODO is removed as this should already be
covered without issue if the client properly replays the chain on
restart.
let delayed_key = ignore_error!(chan_utils::derive_public_key(&self.secp_ctx,&PublicKey::from_secret_key(&self.secp_ctx,&per_commitment_key),&self.their_delayed_payment_base_key.unwrap()));
@@ -910,6 +912,13 @@ impl ChannelMonitor {
910
912
let revokeable_redeemscript = chan_utils::get_revokeable_redeemscript(&revocation_pubkey,self.our_to_self_delay,&delayed_key);
911
913
let revokeable_p2wsh = revokeable_redeemscript.to_v0_p2wsh();
912
914
915
+
let local_payment_p2wpkh = ifletSome(payment_key) = local_payment_key {
916
+
// Note that the Network here is ignored as we immediately drop the address for the
917
+
// script_pubkey version.
918
+
let payment_hash160 = Hash160::from_data(&PublicKey::from_secret_key(&self.secp_ctx,&payment_key).serialize());
0 commit comments