adding effective amount to rpc command getvalueforname

This commit is contained in:
kkurokawa 2016-07-28 18:14:14 -04:00
parent cf2d87a3ba
commit 526b1866ee

View file

@ -136,6 +136,7 @@ UniValue getvalueforname(const UniValue& params, bool fHelp)
"\"txid\" (string) the hash of the transaction which successfully claimed the name\n" "\"txid\" (string) the hash of the transaction which successfully claimed the name\n"
"\"n\" (numeric) vout value\n" "\"n\" (numeric) vout value\n"
"\"amount\" (numeric) txout amount\n" "\"amount\" (numeric) txout amount\n"
"\"effective amount\" (numeric) txout amount plus amount from all supports associated with the claim\n"
"\"height\" (numeric) the height of the block in which this transaction is located\n" "\"height\" (numeric) the height of the block in which this transaction is located\n"
); );
LOCK(cs_main); LOCK(cs_main);
@ -169,6 +170,7 @@ UniValue getvalueforname(const UniValue& params, bool fHelp)
ret.push_back(Pair("txid", claim.outPoint.hash.GetHex())); ret.push_back(Pair("txid", claim.outPoint.hash.GetHex()));
ret.push_back(Pair("n", (int)claim.outPoint.n)); ret.push_back(Pair("n", (int)claim.outPoint.n));
ret.push_back(Pair("amount", claim.nAmount)); ret.push_back(Pair("amount", claim.nAmount));
ret.push_back(Pair("effective amount", claim.nEffectiveAmount));
ret.push_back(Pair("height", claim.nHeight)); ret.push_back(Pair("height", claim.nHeight));
return ret; return ret;
} }