HomePhabricator

[backport#17381 2/5] Pass CTxDestination to ScriptPubKeyMan::GetMetadata

Description

[backport#17381 2/5] Pass CTxDestination to ScriptPubKeyMan::GetMetadata

Summary:
Pass CTxDestination instead of more ambiguous uint160 hash value. This is more
type safe and more efficient since it avoids doing map lookups that will always
fail and were not done previously before https://github.com/bitcoin/bitcoin/commit/a18edd7b383d667b15b6d4b87aa3a055a9fa5051

Change suggested by Andrew Chow <achow101-github@achow101.com> in
https://github.com/bitcoin/bitcoin/pull/17304#discussion_r340345745 and
https://github.com/bitcoin/bitcoin/pull/17381#issuecomment-549994944


https://github.com/bitcoin/bitcoin/pull/17381/commits/4a0abf694ee10cf186f25a67ca35c3fce0c10874

Depends on D7416

Partial backport of Core PR17381

Test Plan:

ninja check check-functional

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

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

Details

Provenance
Russell Yanofsky <russ@yanofsky.org>Authored on Nov 5 2019, 15:36
majcostaCommitted on Sep 11 2020, 15:15
majcostaPushed on Sep 11 2020, 15:15
Reviewer
Restricted Project
Differential Revision
D7417: [backport#17381 2/5] Pass CTxDestination to ScriptPubKeyMan::GetMetadata
Parents
rABC6c1781a66c30: [backport#17381 1/5] Add EnsureLegacyScriptPubKeyMan and use in rpcwallet.cpp
Branches
Unknown
Tags
Unknown