Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcwallet.cpp
Show First 20 Lines • Show All 3,810 Lines • ▼ Show 20 Lines | UniValue signrawtransactionwithwallet(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]; | ||||
} | } | ||||
pwallet->chain().findCoins(coins); | pwallet->chain().findCoins(coins); | ||||
return SignTransaction(mtx, request.params[1], pwallet, coins, false, | // Parse the prevtxs array | ||||
request.params[2]); | ParsePrevouts(request.params[1], nullptr, coins); | ||||
return SignTransaction(mtx, pwallet, coins, request.params[2]); | |||||
} | } | ||||
UniValue rescanblockchain(const Config &config, const JSONRPCRequest &request) { | UniValue rescanblockchain(const Config &config, const JSONRPCRequest &request) { | ||||
std::shared_ptr<CWallet> const wallet = GetWalletForJSONRPCRequest(request); | std::shared_ptr<CWallet> const wallet = GetWalletForJSONRPCRequest(request); | ||||
CWallet *const pwallet = wallet.get(); | CWallet *const pwallet = wallet.get(); | ||||
if (!EnsureWalletIsAvailable(pwallet, request.fHelp)) { | if (!EnsureWalletIsAvailable(pwallet, request.fHelp)) { | ||||
return NullUniValue; | return NullUniValue; | ||||
▲ Show 20 Lines • Show All 891 Lines • Show Last 20 Lines |