mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Remove GetScriptForWitness function
This commit is contained in:
parent
b887060d06
commit
fec8336ad9
2 changed files with 0 additions and 22 deletions
|
|
@ -313,18 +313,6 @@ CScript GetScriptForMultisig(int nRequired, const std::vector<CPubKey>& keys)
|
|||
return script;
|
||||
}
|
||||
|
||||
CScript GetScriptForWitness(const CScript& redeemscript)
|
||||
{
|
||||
std::vector<std::vector<unsigned char> > vSolutions;
|
||||
TxoutType typ = Solver(redeemscript, vSolutions);
|
||||
if (typ == TxoutType::PUBKEY) {
|
||||
return GetScriptForDestination(WitnessV0KeyHash(Hash160(vSolutions[0])));
|
||||
} else if (typ == TxoutType::PUBKEYHASH) {
|
||||
return GetScriptForDestination(WitnessV0KeyHash(uint160{vSolutions[0]}));
|
||||
}
|
||||
return GetScriptForDestination(WitnessV0ScriptHash(redeemscript));
|
||||
}
|
||||
|
||||
bool IsValidDestination(const CTxDestination& dest) {
|
||||
return dest.which() != 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue