Convert CPubKey to WitnessV0KeyHash directly

The round-tripping through PKHash has no effect, and is
potentially misleading as such.
This commit is contained in:
Ben Woosley
2020-01-14 23:46:14 -08:00
parent 3fcc468123
commit a9e451f144
4 changed files with 6 additions and 4 deletions

View File

@@ -103,6 +103,7 @@ struct WitnessV0KeyHash : public uint160
{
WitnessV0KeyHash() : uint160() {}
explicit WitnessV0KeyHash(const uint160& hash) : uint160(hash) {}
explicit WitnessV0KeyHash(const CPubKey& pubkey);
};
//! CTxDestination subtype to encode any future Witness version