Serialize effective amount #231

Closed
bvbfan wants to merge 309 commits from serialize_effective_amount into master
Showing only changes of commit 368a7389f4 - Show all commits

View file

@ -77,7 +77,7 @@ UniValue getclaimsintrie(const UniValue& params, bool fHelp)
__func__, itClaims->outPoint.hash.GetHex()); __func__, itClaims->outPoint.hash.GetHex());
claim.push_back(Pair("error", "No value found for claim")); claim.push_back(Pair("error", "No value found for claim"));
} }
else if (coin->vout.size() < itClaims->outPoint.n || coin->vout[itClaims->outPoint.n].IsNull()) else if (!coin->IsAvailable(itClaims->outPoint.n))
{ {
LogPrintf("%s: the specified txout of %s appears to have been spent\n", __func__, itClaims->outPoint.hash.GetHex()); LogPrintf("%s: the specified txout of %s appears to have been spent\n", __func__, itClaims->outPoint.hash.GetHex());
claim.push_back(Pair("error", "Txout spent")); claim.push_back(Pair("error", "Txout spent"));
@ -153,7 +153,7 @@ bool getValueForClaim(const COutPoint& out, std::string& sValue)
__func__, out.hash.GetHex()); __func__, out.hash.GetHex());
return true; return true;
} }
if (coin->vout.size() < out.n || coin->vout[out.n].IsNull()) if(!coin->IsAvailable(out.n))
{ {
LogPrintf("%s: the specified txout of %s appears to have been spent\n", __func__, out.hash.GetHex()); LogPrintf("%s: the specified txout of %s appears to have been spent\n", __func__, out.hash.GetHex());
return true; return true;