diff --git a/src/init.cpp b/src/init.cpp index e28dadca9..4231407da 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1868,6 +1868,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) StartNode(threadGroup, scheduler); + VERUS_CHEATCATCHER = GetArg("-cheatcatcher", ""); #ifdef ENABLE_MINING // Generate coins in the background diff --git a/src/komodo_utils.h b/src/komodo_utils.h index 827b19812..9cb6cd764 100644 --- a/src/komodo_utils.h +++ b/src/komodo_utils.h @@ -1661,8 +1661,6 @@ void komodo_args(char *argv0) } else KOMODO_MININGTHREADS = 0; - VERUS_CHEATCATCHER = GetArg("-cheatcatcher", ""); - if ( (KOMODO_EXCHANGEWALLET= GetBoolArg("-exchange", false)) != 0 ) fprintf(stderr,"KOMODO_EXCHANGEWALLET mode active\n"); DONATION_PUBKEY = GetArg("-donation", ""); diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index c56685c85..e11e0c520 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -1622,8 +1622,6 @@ void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDe list listReceived; list listSent; - wtx.GetAmounts(listReceived, listSent, nFee, strSentAccount, filter); - CStakeParams p; bool bIsStake = false; bool bIsCoinbase = false; @@ -1638,6 +1636,8 @@ void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDe bIsMint = bIsCoinbase && wtx.vout.size() > 0 && wtx.vout[0].scriptPubKey.IsPayToCryptoCondition(); } + wtx.GetAmounts(listReceived, listSent, nFee, strSentAccount, bIsStake ? ISMINE_ALLANDCHANGE : filter); + bool fAllAccounts = (strAccount == string("*")); bool involvesWatchonly = wtx.IsFromMe(ISMINE_WATCH_ONLY); diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index d9ff1d0c7..f7af5ee50 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2583,7 +2583,7 @@ void CWalletTx::GetAmounts(list& listReceived, if (nDebit > 0) { // Don't report 'change' txouts - if (pwallet->IsChange(txout)) + if (!(filter & ISMINE_CHANGE) && pwallet->IsChange(txout)) continue; } else if (!(fIsMine & filter)) diff --git a/src/wallet/wallet_ismine.h b/src/wallet/wallet_ismine.h index 5b9b0e084..2f0e1080d 100644 --- a/src/wallet/wallet_ismine.h +++ b/src/wallet/wallet_ismine.h @@ -18,7 +18,9 @@ enum isminetype ISMINE_NO = 0, ISMINE_WATCH_ONLY = 1, ISMINE_SPENDABLE = 2, - ISMINE_ALL = ISMINE_WATCH_ONLY | ISMINE_SPENDABLE + ISMINE_CHANGE = 4, + ISMINE_ALL = ISMINE_WATCH_ONLY | ISMINE_SPENDABLE, + ISMINE_ALLANDCHANGE = ISMINE_ALL | ISMINE_CHANGE }; /** used for bitflags of isminetype */ typedef uint8_t isminefilter;