Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/rawtransaction.cpp
Show First 20 Lines • Show All 1,715 Lines • ▼ Show 20 Lines | if (!DecodePSBT(psbtx, request.params[0].get_str(), error)) { | ||||
strprintf("TX decode failed %s", error)); | strprintf("TX decode failed %s", error)); | ||||
} | } | ||||
// Get all of the previous transactions | // Get all of the previous transactions | ||||
bool complete = true; | bool complete = true; | ||||
for (size_t i = 0; i < psbtx.tx->vin.size(); ++i) { | for (size_t i = 0; i < psbtx.tx->vin.size(); ++i) { | ||||
PSBTInput &input = psbtx.inputs.at(i); | PSBTInput &input = psbtx.inputs.at(i); | ||||
SignatureData sigdata; | complete &= SignPSBTInput(DUMMY_SIGNING_PROVIDER, *psbtx.tx, input, i, | ||||
complete &= SignPSBTInput(DUMMY_SIGNING_PROVIDER, *psbtx.tx, input, | SigHashType()); | ||||
sigdata, i, SigHashType()); | |||||
} | } | ||||
UniValue result(UniValue::VOBJ); | UniValue result(UniValue::VOBJ); | ||||
CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION); | CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION); | ||||
bool extract = request.params[1].isNull() || (!request.params[1].isNull() && | bool extract = request.params[1].isNull() || (!request.params[1].isNull() && | ||||
request.params[1].get_bool()); | request.params[1].get_bool()); | ||||
if (complete && extract) { | if (complete && extract) { | ||||
CMutableTransaction mtx(*psbtx.tx); | CMutableTransaction mtx(*psbtx.tx); | ||||
▲ Show 20 Lines • Show All 193 Lines • Show Last 20 Lines |