From 47658758e170324bbcdef6abdea65db2d439c12e Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 22 Oct 2016 12:27:01 -0300 Subject: [PATCH] test --- src/rpcblockchain.cpp | 5 +---- src/wallet/rpcwallet.cpp | 8 ++++---- src/wallet/wallet.cpp | 2 +- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp index 396211a8f..c9c13b7a0 100644 --- a/src/rpcblockchain.cpp +++ b/src/rpcblockchain.cpp @@ -452,14 +452,11 @@ Value gettxout(const Array& params, bool fHelp) else ret.push_back(Pair("confirmations", pindex->nHeight - coins.nHeight + 1)); ret.push_back(Pair("value", ValueFromAmount(coins.vout[n].nValue))); - it = mapBlockIndex.find(hash); - if ( (pindex= it->second) != 0 ) - { uint64_t interest; 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); ret.push_back(Pair("interest", ValueFromAmount(interest))); - } + Object o; ScriptPubKeyToJSON(coins.vout[n].scriptPubKey, o, true); ret.push_back(Pair("scriptPubKey", o)); diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index a059fa9a3..0a5d8f579 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -610,7 +610,7 @@ Value getreceivedbyaddress(const Array& params, bool fHelp) BOOST_FOREACH(const CTxOut& txout, wtx.vout) if (txout.scriptPubKey == scriptPubKey) if (wtx.GetDepthInMainChain() >= nMinDepth) - nAmount += txout.nValue; + nAmount += txout.nValue; // komodo_interest? } return ValueFromAmount(nAmount); @@ -666,7 +666,7 @@ Value getreceivedbyaccount(const Array& params, bool fHelp) CTxDestination address; if (ExtractDestination(txout.scriptPubKey, address) && IsMine(*pwalletMain, address) && setAddress.count(address)) if (wtx.GetDepthInMainChain() >= nMinDepth) - nAmount += txout.nValue; + nAmount += txout.nValue; // komodo_interest? } } @@ -1140,7 +1140,7 @@ Value ListReceived(const Array& params, bool fByAccounts) continue; tallyitem& item = mapTally[address]; - item.nAmount += txout.nValue; + item.nAmount += txout.nValue; // komodo_interest? item.nConf = min(item.nConf, nDepth); item.txids.push_back(wtx.GetHash()); 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; } return balance; diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 9f1f07536..dadb566d0 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1312,7 +1312,7 @@ CAmount CWallet::GetDebit(const CTxIn &txin, const isminefilter& filter) const const CWalletTx& prev = (*mi).second; if (txin.prevout.n < prev.vout.size()) 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;