Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/blockchain.cpp
Show First 20 Lines • Show All 1,152 Lines • ▼ Show 20 Lines | if (request.fHelp || request.params.size() < 2 || | ||||
"\nAs a json rpc call\n" + | "\nAs a json rpc call\n" + | ||||
HelpExampleRpc("gettxout", "\"txid\", 1")); | HelpExampleRpc("gettxout", "\"txid\", 1")); | ||||
} | } | ||||
LOCK(cs_main); | LOCK(cs_main); | ||||
UniValue ret(UniValue::VOBJ); | UniValue ret(UniValue::VOBJ); | ||||
std::string strHash = request.params[0].get_str(); | std::string strTxId = request.params[0].get_str(); | ||||
uint256 hash(uint256S(strHash)); | TxId txid(uint256S(strTxId)); | ||||
jasonbcox: nit: const | |||||
int n = request.params[1].get_int(); | int n = request.params[1].get_int(); | ||||
COutPoint out(hash, n); | COutPoint out(txid, n); | ||||
bool fMempool = true; | bool fMempool = true; | ||||
if (!request.params[2].isNull()) { | if (!request.params[2].isNull()) { | ||||
fMempool = request.params[2].get_bool(); | fMempool = request.params[2].get_bool(); | ||||
} | } | ||||
Coin coin; | Coin coin; | ||||
if (fMempool) { | if (fMempool) { | ||||
LOCK(g_mempool.cs); | LOCK(g_mempool.cs); | ||||
▲ Show 20 Lines • Show All 788 Lines • Show Last 20 Lines |
nit: const