nochowderforyou / clams

Clam Project
MIT License
62 stars 58 forks source link

coin-splitting logic is wrong #179

Closed dooglus closed 9 years ago

dooglus commented 9 years ago

From wallet.cpp:

            // if we're splitting on size, only split if adding 1 to the current size will make it double the split size
            // and if we're not, split on age
            if (( nSplitSize && nCredit >= nSplitSize * 2 - 1) ||

That -1 should be -COIN (since we mean 1 CLAM, not one satoshi).

But really the decision of whether to split or not would be better placed after we've calculated the reward so we know how much value we're splitting.

dooglus commented 9 years ago

Fixed in 4c6a7d60.