Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/blockchain.cpp
Show First 20 Lines • Show All 1,166 Lines • ▼ Show 20 Lines | 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); | ||||
CCoinsViewMemPool view(pcoinsTip.get(), g_mempool); | CCoinsViewMemPool view(pcoinsTip.get(), g_mempool); | ||||
if (!view.GetCoin(out, coin) || g_mempool.isSpent(out)) { | if (!view.GetCoin(out, coin) || g_mempool.isSpent(out)) { | ||||
// TODO: this should be done by the CCoinsViewMemPool | |||||
return NullUniValue; | return NullUniValue; | ||||
} | } | ||||
} else { | } else { | ||||
if (!pcoinsTip->GetCoin(out, coin)) { | if (!pcoinsTip->GetCoin(out, coin)) { | ||||
return NullUniValue; | return NullUniValue; | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 778 Lines • Show Last 20 Lines |