test
This commit is contained in:
@@ -452,14 +452,11 @@ Value gettxout(const Array& params, bool fHelp)
|
|||||||
else ret.push_back(Pair("confirmations", pindex->nHeight - coins.nHeight + 1));
|
else ret.push_back(Pair("confirmations", pindex->nHeight - coins.nHeight + 1));
|
||||||
ret.push_back(Pair("value", ValueFromAmount(coins.vout[n].nValue)));
|
ret.push_back(Pair("value", ValueFromAmount(coins.vout[n].nValue)));
|
||||||
|
|
||||||
it = mapBlockIndex.find(hash);
|
|
||||||
if ( (pindex= it->second) != 0 )
|
|
||||||
{
|
|
||||||
uint64_t interest;
|
uint64_t interest;
|
||||||
interest = komodo_interest(coins.vout[n].nValue,coins.nLockTime,pindex->nTime);
|
interest = komodo_interest(coins.vout[n].nValue,coins.nLockTime,pindex->nTime);
|
||||||
fprintf(stderr,"nValue %llu lock.%u nTime.%u -> %llu\n",(long long)coins.vout[n].nValue,coins.nLockTime,pindex->nTime,(long long)interest);
|
fprintf(stderr,"nValue %llu lock.%u nTime.%u -> %llu\n",(long long)coins.vout[n].nValue,coins.nLockTime,pindex->nTime,(long long)interest);
|
||||||
ret.push_back(Pair("interest", ValueFromAmount(interest)));
|
ret.push_back(Pair("interest", ValueFromAmount(interest)));
|
||||||
}
|
|
||||||
Object o;
|
Object o;
|
||||||
ScriptPubKeyToJSON(coins.vout[n].scriptPubKey, o, true);
|
ScriptPubKeyToJSON(coins.vout[n].scriptPubKey, o, true);
|
||||||
ret.push_back(Pair("scriptPubKey", o));
|
ret.push_back(Pair("scriptPubKey", o));
|
||||||
|
|||||||
@@ -610,7 +610,7 @@ Value getreceivedbyaddress(const Array& params, bool fHelp)
|
|||||||
BOOST_FOREACH(const CTxOut& txout, wtx.vout)
|
BOOST_FOREACH(const CTxOut& txout, wtx.vout)
|
||||||
if (txout.scriptPubKey == scriptPubKey)
|
if (txout.scriptPubKey == scriptPubKey)
|
||||||
if (wtx.GetDepthInMainChain() >= nMinDepth)
|
if (wtx.GetDepthInMainChain() >= nMinDepth)
|
||||||
nAmount += txout.nValue;
|
nAmount += txout.nValue; // komodo_interest?
|
||||||
}
|
}
|
||||||
|
|
||||||
return ValueFromAmount(nAmount);
|
return ValueFromAmount(nAmount);
|
||||||
@@ -666,7 +666,7 @@ Value getreceivedbyaccount(const Array& params, bool fHelp)
|
|||||||
CTxDestination address;
|
CTxDestination address;
|
||||||
if (ExtractDestination(txout.scriptPubKey, address) && IsMine(*pwalletMain, address) && setAddress.count(address))
|
if (ExtractDestination(txout.scriptPubKey, address) && IsMine(*pwalletMain, address) && setAddress.count(address))
|
||||||
if (wtx.GetDepthInMainChain() >= nMinDepth)
|
if (wtx.GetDepthInMainChain() >= nMinDepth)
|
||||||
nAmount += txout.nValue;
|
nAmount += txout.nValue; // komodo_interest?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1140,7 +1140,7 @@ Value ListReceived(const Array& params, bool fByAccounts)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
tallyitem& item = mapTally[address];
|
tallyitem& item = mapTally[address];
|
||||||
item.nAmount += txout.nValue;
|
item.nAmount += txout.nValue; // komodo_interest?
|
||||||
item.nConf = min(item.nConf, nDepth);
|
item.nConf = min(item.nConf, nDepth);
|
||||||
item.txids.push_back(wtx.GetHash());
|
item.txids.push_back(wtx.GetHash());
|
||||||
if (mine & ISMINE_WATCH_ONLY)
|
if (mine & ISMINE_WATCH_ONLY)
|
||||||
@@ -2893,7 +2893,7 @@ CAmount getBalanceTaddr(std::string transparentAddress, int minDepth=1) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CAmount nValue = out.tx->vout[out.i].nValue;
|
CAmount nValue = out.tx->vout[out.i].nValue; // komodo_interest
|
||||||
balance += nValue;
|
balance += nValue;
|
||||||
}
|
}
|
||||||
return balance;
|
return balance;
|
||||||
|
|||||||
@@ -1312,7 +1312,7 @@ CAmount CWallet::GetDebit(const CTxIn &txin, const isminefilter& filter) const
|
|||||||
const CWalletTx& prev = (*mi).second;
|
const CWalletTx& prev = (*mi).second;
|
||||||
if (txin.prevout.n < prev.vout.size())
|
if (txin.prevout.n < prev.vout.size())
|
||||||
if (IsMine(prev.vout[txin.prevout.n]) & filter)
|
if (IsMine(prev.vout[txin.prevout.n]) & filter)
|
||||||
return prev.vout[txin.prevout.n].nValue;
|
return prev.vout[txin.prevout.n].nValue; // komodo_interest?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user