mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-05 10:12:48 +01:00
Prefer explicit uint160 conversion
This commit is contained in:
@@ -78,7 +78,6 @@ struct PKHash : public uint160
|
||||
PKHash() : uint160() {}
|
||||
explicit PKHash(const uint160& hash) : uint160(hash) {}
|
||||
explicit PKHash(const CPubKey& pubkey);
|
||||
using uint160::uint160;
|
||||
};
|
||||
|
||||
struct WitnessV0KeyHash;
|
||||
@@ -91,7 +90,6 @@ struct ScriptHash : public uint160
|
||||
explicit ScriptHash(const PKHash& hash) = delete;
|
||||
explicit ScriptHash(const uint160& hash) : uint160(hash) {}
|
||||
explicit ScriptHash(const CScript& script);
|
||||
using uint160::uint160;
|
||||
};
|
||||
|
||||
struct WitnessV0ScriptHash : public uint256
|
||||
@@ -99,14 +97,12 @@ struct WitnessV0ScriptHash : public uint256
|
||||
WitnessV0ScriptHash() : uint256() {}
|
||||
explicit WitnessV0ScriptHash(const uint256& hash) : uint256(hash) {}
|
||||
explicit WitnessV0ScriptHash(const CScript& script);
|
||||
using uint256::uint256;
|
||||
};
|
||||
|
||||
struct WitnessV0KeyHash : public uint160
|
||||
{
|
||||
WitnessV0KeyHash() : uint160() {}
|
||||
explicit WitnessV0KeyHash(const uint160& hash) : uint160(hash) {}
|
||||
using uint160::uint160;
|
||||
};
|
||||
|
||||
//! CTxDestination subtype to encode any future Witness version
|
||||
|
||||
Reference in New Issue
Block a user