Convert non-witness UTXOs to witness if witness sig created
If a witness signature was created when a non-witness UTXO is used, convert the non-witness UTXO to a witness one.
This commit is contained in:
parent
d2611e9d97
commit
b7e58f9c1d
1 changed files with 7 additions and 0 deletions
|
@ -3988,6 +3988,13 @@ UniValue sethdseed(const JSONRPCRequest& request)
|
||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sigdata.witness) {
|
||||||
|
// Convert the non-witness utxo to witness
|
||||||
|
if (input.witness_utxo.IsNull() && input.non_witness_utxo) {
|
||||||
|
input.witness_utxo = input.non_witness_utxo->vout[txin.prevout.n];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
UniValue walletprocesspsbt(const JSONRPCRequest& request)
|
UniValue walletprocesspsbt(const JSONRPCRequest& request)
|
||||||
{
|
{
|
||||||
std::shared_ptr<CWallet> const wallet = GetWalletForJSONRPCRequest(request);
|
std::shared_ptr<CWallet> const wallet = GetWalletForJSONRPCRequest(request);
|
||||||
|
|
Loading…
Add table
Reference in a new issue