Changeset View
Changeset View
Standalone View
Standalone View
src/rest.cpp
Show First 20 Lines • Show All 474 Lines • ▼ Show 20 Lines | static bool rest_getutxos(Config &config, HTTPRequest *req, | ||||
bool fCheckMemPool = false; | bool fCheckMemPool = false; | ||||
std::vector<COutPoint> vOutPoints; | std::vector<COutPoint> vOutPoints; | ||||
// parse/deserialize input | // parse/deserialize input | ||||
// input-format = output-format, rest/getutxos/bin requires binary input, | // input-format = output-format, rest/getutxos/bin requires binary input, | ||||
// gives binary output, ... | // gives binary output, ... | ||||
if (uriParts.size() > 0) { | if (uriParts.size() > 0) { | ||||
// inputs is sent over URI scheme | // inputs is sent over URI scheme | ||||
// (/rest/getutxos/checkmempool/txid1-n/txid2-n/...) | // (/rest/getutxos/checkmempool/txid1-n/txid2-n/...) | ||||
if (uriParts.size() > 0 && uriParts[0] == "checkmempool") { | if (uriParts[0] == "checkmempool") { | ||||
fCheckMemPool = true; | fCheckMemPool = true; | ||||
} | } | ||||
for (size_t i = (fCheckMemPool) ? 1 : 0; i < uriParts.size(); i++) { | for (size_t i = (fCheckMemPool) ? 1 : 0; i < uriParts.size(); i++) { | ||||
uint256 txid; | uint256 txid; | ||||
int32_t nOutput; | int32_t nOutput; | ||||
std::string strTxid = uriParts[i].substr(0, uriParts[i].find("-")); | std::string strTxid = uriParts[i].substr(0, uriParts[i].find("-")); | ||||
std::string strOutput = | std::string strOutput = | ||||
▲ Show 20 Lines • Show All 209 Lines • Show Last 20 Lines |