diff options
author | Ben Woosley <ben.woosley@gmail.com> | 2020-01-14 23:46:14 -0800 |
---|---|---|
committer | Ben Woosley <ben.woosley@gmail.com> | 2020-06-19 12:14:07 -0700 |
commit | a9e451f144480d7b170e49087df162989d31cd20 (patch) | |
tree | a50496593555392d0c996311f65026dc6582a737 /src/wallet/test | |
parent | 3fcc46812334074d2c77a6233e8a961cd0785872 (diff) |
Convert CPubKey to WitnessV0KeyHash directly
The round-tripping through PKHash has no effect, and is
potentially misleading as such.
Diffstat (limited to 'src/wallet/test')
-rw-r--r-- | src/wallet/test/ismine_tests.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wallet/test/ismine_tests.cpp b/src/wallet/test/ismine_tests.cpp index cdb0522920..e416f16044 100644 --- a/src/wallet/test/ismine_tests.cpp +++ b/src/wallet/test/ismine_tests.cpp @@ -167,7 +167,7 @@ BOOST_AUTO_TEST_CASE(ismine_standard) keystore.SetupLegacyScriptPubKeyMan(); LOCK(keystore.GetLegacyScriptPubKeyMan()->cs_KeyStore); - CScript witnessscript = GetScriptForDestination(WitnessV0KeyHash(PKHash(pubkeys[0]))); + CScript witnessscript = GetScriptForDestination(WitnessV0KeyHash(pubkeys[0])); scriptPubKey = GetScriptForDestination(WitnessV0ScriptHash(witnessscript)); BOOST_CHECK(keystore.GetLegacyScriptPubKeyMan()->AddCScript(witnessscript)); @@ -202,7 +202,7 @@ BOOST_AUTO_TEST_CASE(ismine_standard) LOCK(keystore.GetLegacyScriptPubKeyMan()->cs_KeyStore); BOOST_CHECK(keystore.GetLegacyScriptPubKeyMan()->AddKey(keys[0])); - scriptPubKey = GetScriptForDestination(WitnessV0KeyHash(PKHash(pubkeys[0]))); + scriptPubKey = GetScriptForDestination(WitnessV0KeyHash(pubkeys[0])); // Keystore implicitly has key and P2SH redeemScript BOOST_CHECK(keystore.GetLegacyScriptPubKeyMan()->AddCScript(scriptPubKey)); @@ -217,7 +217,7 @@ BOOST_AUTO_TEST_CASE(ismine_standard) LOCK(keystore.GetLegacyScriptPubKeyMan()->cs_KeyStore); BOOST_CHECK(keystore.GetLegacyScriptPubKeyMan()->AddKey(uncompressedKey)); - scriptPubKey = GetScriptForDestination(WitnessV0KeyHash(PKHash(uncompressedPubkey))); + scriptPubKey = GetScriptForDestination(WitnessV0KeyHash(uncompressedPubkey)); // Keystore has key, but no P2SH redeemScript result = keystore.GetLegacyScriptPubKeyMan()->IsMine(scriptPubKey); |