mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Fixes to FillPSBT
This commit is contained in:
parent
e9bfff25db
commit
25df8aa12b
3 changed files with 5 additions and 11 deletions
|
|
@ -4799,7 +4799,7 @@ static RPCHelpMan walletprocesspsbt()
|
|||
// Don't sign, just fill data.
|
||||
bool bip32derivs = request.params[3].isNull() ? true : request.params[3].get_bool();
|
||||
bool complete = true;
|
||||
const TransactionError err = pwallet->FillPSBT(psbtx, complete, nHashType, false, bip32derivs);
|
||||
const TransactionError err = pwallet->FillPSBT(psbtx, complete, nHashType, false, bip32derivs, true);
|
||||
if (err != TransactionError::OK) {
|
||||
throw JSONRPCTransactionError(err);
|
||||
}
|
||||
|
|
@ -5119,7 +5119,7 @@ static RPCHelpMan walletcreatefundedpsbt()
|
|||
// Fill transaction with out data but don't sign
|
||||
bool bip32derivs = request.params[4].isNull() ? false : request.params[4].get_bool();
|
||||
bool complete = true;
|
||||
const TransactionError err = pwallet->FillPSBT(psbtx, complete, 1, false, bip32derivs);
|
||||
const TransactionError err = pwallet->FillPSBT(psbtx, complete, 1, false, bip32derivs, true);
|
||||
if (err != TransactionError::OK) {
|
||||
throw JSONRPCTransactionError(err);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2090,7 +2090,6 @@ TransactionError DescriptorScriptPubKeyMan::FillPSBT(PartiallySignedTransaction&
|
|||
*n_signed = 0;
|
||||
}
|
||||
for (unsigned int i = 0; i < psbtx.inputs.size(); ++i) {
|
||||
const CTxIn& txin = psbtx.tx->vin[i];
|
||||
PSBTInput& input = psbtx.inputs.at(i);
|
||||
|
||||
if (PSBTInputSigned(input)) {
|
||||
|
|
|
|||
|
|
@ -2733,15 +2733,10 @@ TransactionError CWallet::FillPSBTData(PartiallySignedTransaction& psbtx, bool b
|
|||
// We only need the non_witness_utxo, which is a superset of the witness_utxo.
|
||||
// The signing code will switch to the smaller witness_utxo if this is ok.
|
||||
input.non_witness_utxo = wtx.tx;
|
||||
|
||||
/*
|
||||
// ELEMENTS: Grab the CA data
|
||||
CAmount val_tmp;
|
||||
wtx.GetNonIssuanceBlindingData(txin.prevout.n, nullptr, &val_tmp, &input.value_blinding_factor, &input.asset, &input.asset_blinding_factor);
|
||||
if (val_tmp != -1) {
|
||||
input.value = val_tmp;
|
||||
// Set the UTXO rangeproof separately, if it's there
|
||||
if (*input.prev_out < wtx.tx->witness.vtxoutwit.size() && !wtx.tx->witness.vtxoutwit[*input.prev_out].vchRangeproof.empty()) {
|
||||
input.m_utxo_rangeproof = wtx.tx->witness.vtxoutwit[*input.prev_out].vchRangeproof;
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue