Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/rawtransaction.cpp
Show First 20 Lines • Show All 859 Lines • ▼ Show 20 Lines | static UniValue signrawtransactionwithkey(const Config &config, | ||||
// Fetch previous transactions (inputs): | // Fetch previous transactions (inputs): | ||||
std::map<COutPoint, Coin> coins; | std::map<COutPoint, Coin> coins; | ||||
for (const CTxIn &txin : mtx.vin) { | for (const CTxIn &txin : mtx.vin) { | ||||
// Create empty map entry keyed by prevout. | // Create empty map entry keyed by prevout. | ||||
coins[txin.prevout]; | coins[txin.prevout]; | ||||
} | } | ||||
FindCoins(coins); | FindCoins(coins); | ||||
return SignTransaction(mtx, request.params[2], &keystore, coins, true, | // Parse the prevtxs array | ||||
request.params[3]); | ParsePrevouts(request.params[2], &keystore, coins); | ||||
return SignTransaction(mtx, &keystore, coins, request.params[3]); | |||||
} | } | ||||
static UniValue sendrawtransaction(const Config &config, | static UniValue sendrawtransaction(const Config &config, | ||||
const JSONRPCRequest &request) { | const JSONRPCRequest &request) { | ||||
RPCHelpMan{ | RPCHelpMan{ | ||||
"sendrawtransaction", | "sendrawtransaction", | ||||
"\nSubmits raw transaction (serialized, hex-encoded) to local node and " | "\nSubmits raw transaction (serialized, hex-encoded) to local node and " | ||||
"network.\n" | "network.\n" | ||||
▲ Show 20 Lines • Show All 1,123 Lines • Show Last 20 Lines |