mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 14:53:43 +01:00
Use explicit conversion from WitnessV0KeyHash -> CKeyID
These types are equivalent, in data etc, so they need only their data cast across.
This commit is contained in:
@@ -28,6 +28,11 @@ CKeyID ToKeyID(const PKHash& key_hash)
|
||||
return CKeyID{static_cast<uint160>(key_hash)};
|
||||
}
|
||||
|
||||
CKeyID ToKeyID(const WitnessV0KeyHash& key_hash)
|
||||
{
|
||||
return CKeyID{static_cast<uint160>(key_hash)};
|
||||
}
|
||||
|
||||
WitnessV0ScriptHash::WitnessV0ScriptHash(const CScript& in)
|
||||
{
|
||||
CSHA256().Write(in.data(), in.size()).Finalize(begin());
|
||||
|
||||
Reference in New Issue
Block a user