mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02: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:
parent
2c54217f91
commit
f32c1e07fd
4 changed files with 9 additions and 3 deletions
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue