Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcwallet.cpp
Show First 20 Lines • Show All 5,120 Lines • ▼ Show 20 Lines | for (size_t i = 0; i < txConst->vin.size(); ++i) { | ||||
// Get the Sighash type | // Get the Sighash type | ||||
if (sign && input.sighash_type.getRawSigHashType() > 0 && | if (sign && input.sighash_type.getRawSigHashType() > 0 && | ||||
input.sighash_type != sighash_type) { | input.sighash_type != sighash_type) { | ||||
throw JSONRPCError( | throw JSONRPCError( | ||||
RPC_DESERIALIZATION_ERROR, | RPC_DESERIALIZATION_ERROR, | ||||
"Specified sighash and sighash in PSBT do not match."); | "Specified sighash and sighash in PSBT do not match."); | ||||
} | } | ||||
SignatureData sigdata; | |||||
complete &= | complete &= | ||||
SignPSBTInput(HidingSigningProvider(pwallet, !sign, !bip32derivs), | SignPSBTInput(HidingSigningProvider(pwallet, !sign, !bip32derivs), | ||||
*psbtx.tx, input, sigdata, i, sighash_type); | *psbtx.tx, input, i, sighash_type); | ||||
} | } | ||||
// Fill in the bip32 keypaths and redeemscripts for the outputs so that | // Fill in the bip32 keypaths and redeemscripts for the outputs so that | ||||
// hardware wallets can identify change | // hardware wallets can identify change | ||||
for (size_t i = 0; i < txConst->vout.size(); ++i) { | for (size_t i = 0; i < txConst->vout.size(); ++i) { | ||||
const CTxOut &out = txConst->vout.at(i); | const CTxOut &out = txConst->vout.at(i); | ||||
PSBTOutput &psbt_out = psbtx.outputs.at(i); | PSBTOutput &psbt_out = psbtx.outputs.at(i); | ||||
▲ Show 20 Lines • Show All 326 Lines • Show Last 20 Lines |