aboutsummaryrefslogtreecommitdiff
path: root/src/script/standard.cpp
diff options
context:
space:
mode:
authorBen Woosley <ben.woosley@gmail.com>2020-01-15 13:41:25 -0800
committerBen Woosley <ben.woosley@gmail.com>2020-06-19 12:14:08 -0700
commitf32c1e07fd6c174ff3f6406a619550d2f6c19360 (patch)
tree12c70ed12c60e6feea3e6228c15bf12a7c64a6df /src/script/standard.cpp
parent2c54217f913967703b404747133be67cf2f4feac (diff)
Use explicit conversion from WitnessV0KeyHash -> CKeyID
These types are equivalent, in data etc, so they need only their data cast across.
Diffstat (limited to 'src/script/standard.cpp')
-rw-r--r--src/script/standard.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/script/standard.cpp b/src/script/standard.cpp
index 4b408d82e3..a47ccef842 100644
--- a/src/script/standard.cpp
+++ b/src/script/standard.cpp
@@ -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());