mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -05:00
Don't allow implementers to think ScriptHash(Witness*()) results in nesting computation
This commit is contained in:
parent
4b8f1e989f
commit
6dd59d2e49
1 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue