forked from blacknet-ninja/blackcoin-old
-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Description
I used mininput=0.01 in clam.conf to ignore outputs smaller than 0.01 CLAM, then sent myself a transaction paying me multiple outputs, some larger than 0.01 and some smaller.
When I listunspent, I only see the larger outputs, but when I getbalance I see the sum of all outputs, not only the larger ones.
It seems the solution is to move the threshold test up a level:
diff --git a/src/wallet.h b/src/wallet.h
index 6386b1c..1b98045 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -242,7 +242,7 @@ public:
int64_t GetDebit(const CTxIn& txin) const;
bool IsMine(const CTxOut& txout) const
{
- return ::IsMine(*this, txout.scriptPubKey);
+ return txout.nValue >= nMinimumInputValue && ::IsMine(*this, txout.scriptPubKey);
}
int64_t GetCredit(const CTxOut& txout) const
{
@@ -260,7 +260,7 @@ public:
bool IsMine(const CTransaction& tx) const
{
BOOST_FOREACH(const CTxOut& txout, tx.vout)
- if (IsMine(txout) && txout.nValue >= nMinimumInputValue)
+ if (IsMine(txout))
return true;
return false;
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels