Browse Source

Return more stake outputs, including those thought to be change, fix cheatcatcher error reporting

pull/4/head
miketout 6 years ago
parent
commit
73b4d69673
  1. 1
      src/init.cpp
  2. 2
      src/komodo_utils.h
  3. 4
      src/wallet/rpcwallet.cpp
  4. 2
      src/wallet/wallet.cpp
  5. 4
      src/wallet/wallet_ismine.h

1
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

2
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", "");

4
src/wallet/rpcwallet.cpp

@ -1622,8 +1622,6 @@ void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDe
list<COutputEntry> listReceived;
list<COutputEntry> 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);

2
src/wallet/wallet.cpp

@ -2583,7 +2583,7 @@ void CWalletTx::GetAmounts(list<COutputEntry>& 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))

4
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;

Loading…
Cancel
Save