HomePhabricator

[backport#17924] Bug: IsUsedDestination shouldn't use key id as script id for…

Description

[backport#17924] Bug: IsUsedDestination shouldn't use key id as script id for ScriptHash

Summary:
6dd59d2e491bc11ab26498668543e65440a3a931 Don't allow implementers to think ScriptHash(Witness*()) results in nesting computation (Gregory Sanders)
4b8f1e989f3b969dc628b0801d5c31ebd373719c IsUsedDestination shouldn't use key id as script id for ScriptHash (Gregory Sanders)

Pull request description:

Regression introduced in https://github.com/bitcoin/bitcoin/pull/17621 which causes p2sh-segwit addresses to be erroneously missed.

Tests are only failing in 0.19 branch, likely because that release still uses p2sh-segwit addresses rather than bech32 by default.

I'll devise a test case to catch this going forward.

Backport of Core PR17924

Test Plan:

ninja all check check-functional

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D7800

Details

Provenance
Wladimir J. van der Laan <laanwj@protonmail.com>Authored on Jan 16 2020, 18:23
majcostaCommitted on Oct 7 2020, 16:06
majcostaPushed on Oct 7 2020, 16:06
Reviewer
Restricted Project
Differential Revision
D7800: [backport#17924] Bug: IsUsedDestination shouldn't use key id as script id for ScriptHash
Parents
rABC0c373ee40a81: [backport#10691] Trivial: Properly comment about shutdown process in init.cpp…
Branches
Unknown
Tags
Unknown