HomePhabricator

Disallow automatic conversion between disparate hash types

Description

Disallow automatic conversion between disparate hash types

Summary:

This bases the script/standard hash types, TxDestination-related and
CScriptID on a base template which does not silently convert the
underlying uintN type.

Inspired by and built on #17924. Commits are small and focused to ease
review.

Note some of these changes may be relative to existing bugs of the same
sort as #17924. See particularly "Convert CPubKey to WitnessV0KeyHash
directly" and "Remove an apparently unnecessary conversion".

Backport of core PR17938.

Test Plan:

ninja all check-all

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

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

Details

Provenance
Ben Woosley <ben.woosley@gmail.com>Authored on Jan 15 2020, 06:37
FabienCommitted on Feb 3 2021, 16:27
FabienPushed on Feb 3 2021, 16:29
Reviewer
Restricted Project
Differential Revision
D9140: Disallow automatic conversion between disparate hash types
Parents
rABC76508da88237: [Cashtab] Patch validation error preventing send of amounts with less than 8…
Branches
Unknown
Tags
Unknown