diff options
| author | Gregory Sanders <[email protected]> | 2020-01-14 15:05:53 -0500 |
|---|---|---|
| committer | Gregory Sanders <[email protected]> | 2020-01-14 17:10:53 -0500 |
| commit | 6dd59d2e491bc11ab26498668543e65440a3a931 (patch) | |
| tree | 53f752e07df1bd8aeb48ab7c88bb24cb523789f8 /src | |
| parent | IsUsedDestination shouldn't use key id as script id for ScriptHash (diff) | |
| download | discoin-6dd59d2e491bc11ab26498668543e65440a3a931.tar.xz discoin-6dd59d2e491bc11ab26498668543e65440a3a931.zip | |
Don't allow implementers to think ScriptHash(Witness*()) results in nesting computation
Diffstat (limited to 'src')
| -rw-r--r-- | src/script/standard.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/script/standard.h b/src/script/standard.h index 350a5603d..5c73c7fad 100644 --- a/src/script/standard.h +++ b/src/script/standard.h @@ -80,9 +80,14 @@ struct PKHash : public uint160 using uint160::uint160; }; +struct WitnessV0KeyHash; struct ScriptHash : public uint160 { ScriptHash() : uint160() {} + // These don't do what you'd expect. + // Use ScriptHash(GetScriptForDestination(...)) instead. + explicit ScriptHash(const WitnessV0KeyHash& hash) = delete; + explicit ScriptHash(const PKHash& hash) = delete; explicit ScriptHash(const uint160& hash) : uint160(hash) {} explicit ScriptHash(const CScript& script); using uint160::uint160; |