test
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user