|
|
@ -513,8 +513,7 @@ static bool rest_getutxos(HTTPRequest* req, const std::string& strURIPart) |
|
|
|
uint256 hash = vOutPoints[i].hash; |
|
|
|
uint256 hash = vOutPoints[i].hash; |
|
|
|
bool hit = false; |
|
|
|
bool hit = false; |
|
|
|
if (view.GetCoins(hash, coins)) { |
|
|
|
if (view.GetCoins(hash, coins)) { |
|
|
|
mempool.pruneSpent(hash, coins); |
|
|
|
if (coins.IsAvailable(vOutPoints[i].n) && !mempool.isSpent(vOutPoints[i])) { |
|
|
|
if (coins.IsAvailable(vOutPoints[i].n)) { |
|
|
|
|
|
|
|
hit = true; |
|
|
|
hit = true; |
|
|
|
// Safe to index into vout here because IsAvailable checked if it's off the end of the array, or if
|
|
|
|
// Safe to index into vout here because IsAvailable checked if it's off the end of the array, or if
|
|
|
|
// n is valid but points to an already spent output (IsNull).
|
|
|
|
// n is valid but points to an already spent output (IsNull).
|
|
|
|