Use explicit conversion from PKHash -> CKeyID

These types are equivalent, in data etc, so they need only their
data cast across.

Note a function is used rather than a casting
operator as CKeyID is defined at a lower level than script/standard
This commit is contained in:
Ben Woosley
2020-01-15 13:40:14 -08:00
parent a9e451f144
commit 2c54217f91
6 changed files with 11 additions and 7 deletions

View File

@@ -79,6 +79,7 @@ struct PKHash : public uint160
explicit PKHash(const uint160& hash) : uint160(hash) {}
explicit PKHash(const CPubKey& pubkey);
};
CKeyID ToKeyID(const PKHash& key_hash);
struct WitnessV0KeyHash;
struct ScriptHash : public uint160