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)
595595 if (which_type == TX_PUBKEY) {
596596 segwitScr = GetScriptForDestination (WitnessV0KeyHash (Hash160 (solutions_data[0 ].begin (), solutions_data[0 ].end ())));
597597 } else if (which_type == TX_PUBKEYHASH) {
598- segwitScr = GetScriptForDestination (WitnessV0KeyHash (solutions_data[0 ]));
598+ segwitScr = GetScriptForDestination (WitnessV0KeyHash (uint160{ solutions_data[0 ]} ));
599599 } else {
600600 // Scripts that are not fit for P2WPKH are encoded as P2WSH.
601601 // 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)
307307 if (typ == TX_PUBKEY) {
308308 return GetScriptForDestination (WitnessV0KeyHash (Hash160 (vSolutions[0 ].begin (), vSolutions[0 ].end ())));
309309 } else if (typ == TX_PUBKEYHASH) {
310- return GetScriptForDestination (WitnessV0KeyHash (vSolutions[0 ]));
310+ return GetScriptForDestination (WitnessV0KeyHash (uint160{ vSolutions[0 ]} ));
311311 }
312312 return GetScriptForDestination (WitnessV0ScriptHash (redeemscript));
313313}
Original file line number Diff line number Diff line change @@ -78,7 +78,6 @@ struct PKHash : public uint160
7878 PKHash () : uint160() {}
7979 explicit PKHash (const uint160& hash) : uint160(hash) {}
8080 explicit PKHash (const CPubKey& pubkey);
81- using uint160::uint160;
8281};
8382
8483struct WitnessV0KeyHash ;
@@ -91,22 +90,19 @@ struct ScriptHash : public uint160
9190 explicit ScriptHash (const PKHash& hash) = delete;
9291 explicit ScriptHash (const uint160& hash) : uint160(hash) {}
9392 explicit ScriptHash (const CScript& script);
94- using uint160::uint160;
9593};
9694
9795struct WitnessV0ScriptHash : public uint256
9896{
9997 WitnessV0ScriptHash () : uint256() {}
10098 explicit WitnessV0ScriptHash (const uint256& hash) : uint256(hash) {}
10199 explicit WitnessV0ScriptHash (const CScript& script);
102- using uint256::uint256;
103100};
104101
105102struct WitnessV0KeyHash : public uint160
106103{
107104 WitnessV0KeyHash () : uint160() {}
108105 explicit WitnessV0KeyHash (const uint160& hash) : uint160(hash) {}
109- using uint160::uint160;
110106};
111107
112108// ! CTxDestination subtype to encode any future Witness version
You can’t perform that action at this time.
0 commit comments