This commit is contained in:
jl777
2016-10-21 17:28:28 -03:00
parent 75b751ec17
commit 0f24f24562
6 changed files with 24 additions and 10 deletions

View File

@@ -96,6 +96,7 @@ Array TxJoinSplitToJSON(const CTransaction& tx) {
return vjoinsplit;
}
int64_t komodo_interest(uint64_t nValue,uint32_t pastlocktime,uint32_t tiptime);
void TxToJSON(const CTransaction& tx, const uint256 hashBlock, Object& entry)
{
entry.push_back(Pair("txid", tx.GetHash().GetHex()));
@@ -123,6 +124,7 @@ void TxToJSON(const CTransaction& tx, const uint256 hashBlock, Object& entry)
const CTxOut& txout = tx.vout[i];
Object out;
out.push_back(Pair("value", ValueFromAmount(txout.nValue)));
out.push_back(Pair("interest", ValueFromAmount(komodo_interest(txout.nValue,tx.nLockTime,chainActive.Tip()->nTime))));
out.push_back(Pair("n", (int64_t)i));
Object o;
ScriptPubKeyToJSON(txout.scriptPubKey, o, true);