File tree Expand file tree Collapse file tree 3 files changed +2
-6
lines changed Expand file tree Collapse file tree 3 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -595,7 +595,7 @@ static UniValue decodescript(const JSONRPCRequest& request)
595
595
if (which_type == TX_PUBKEY) {
596
596
segwitScr = GetScriptForDestination (WitnessV0KeyHash (Hash160 (solutions_data[0 ].begin (), solutions_data[0 ].end ())));
597
597
} else if (which_type == TX_PUBKEYHASH) {
598
- segwitScr = GetScriptForDestination (WitnessV0KeyHash (solutions_data[0 ]));
598
+ segwitScr = GetScriptForDestination (WitnessV0KeyHash (uint160{ solutions_data[0 ]} ));
599
599
} else {
600
600
// Scripts that are not fit for P2WPKH are encoded as P2WSH.
601
601
// Newer segwit program versions should be considered when then become available.
Original file line number Diff line number Diff line change @@ -307,7 +307,7 @@ CScript GetScriptForWitness(const CScript& redeemscript)
307
307
if (typ == TX_PUBKEY) {
308
308
return GetScriptForDestination (WitnessV0KeyHash (Hash160 (vSolutions[0 ].begin (), vSolutions[0 ].end ())));
309
309
} else if (typ == TX_PUBKEYHASH) {
310
- return GetScriptForDestination (WitnessV0KeyHash (vSolutions[0 ]));
310
+ return GetScriptForDestination (WitnessV0KeyHash (uint160{ vSolutions[0 ]} ));
311
311
}
312
312
return GetScriptForDestination (WitnessV0ScriptHash (redeemscript));
313
313
}
Original file line number Diff line number Diff line change @@ -78,7 +78,6 @@ struct PKHash : public uint160
78
78
PKHash () : uint160() {}
79
79
explicit PKHash (const uint160& hash) : uint160(hash) {}
80
80
explicit PKHash (const CPubKey& pubkey);
81
- using uint160::uint160;
82
81
};
83
82
84
83
struct WitnessV0KeyHash ;
@@ -91,22 +90,19 @@ struct ScriptHash : public uint160
91
90
explicit ScriptHash (const PKHash& hash) = delete;
92
91
explicit ScriptHash (const uint160& hash) : uint160(hash) {}
93
92
explicit ScriptHash (const CScript& script);
94
- using uint160::uint160;
95
93
};
96
94
97
95
struct WitnessV0ScriptHash : public uint256
98
96
{
99
97
WitnessV0ScriptHash () : uint256() {}
100
98
explicit WitnessV0ScriptHash (const uint256& hash) : uint256(hash) {}
101
99
explicit WitnessV0ScriptHash (const CScript& script);
102
- using uint256::uint256;
103
100
};
104
101
105
102
struct WitnessV0KeyHash : public uint160
106
103
{
107
104
WitnessV0KeyHash () : uint160() {}
108
105
explicit WitnessV0KeyHash (const uint160& hash) : uint160(hash) {}
109
- using uint160::uint160;
110
106
};
111
107
112
108
// ! CTxDestination subtype to encode any future Witness version
You can’t perform that action at this time.
0 commit comments