Post
Topic
Board Development & Technical Discussion
Re: [BUG] Possible Double Spend
by
vector76
on 17/08/2011, 17:59:41 UTC
It looks like

Code:
// Priority is sum(valuein * age) / txsize
and
Code:
    static bool AllowFree(double dPriority)
    {
        // Large (in bytes) low-priority (new, small-coin) transactions
        // need a fee.
        return dPriority > COIN * 144 / 250;
    }
and
Code:
                // Free transaction area
                if (nNewBlockSize < 27000)
                    nMinFee = 0;
but
Code:
        // To limit dust spam, require MIN_TX_FEE/MIN_RELAY_TX_FEE if any output is less than 0.01
        if (nMinFee < nBaseFee)
            BOOST_FOREACH(const CTxOut& txout, vout)
                if (txout.nValue < CENT)
                    nMinFee = nBaseFee;

So, if I'm reading this correctly, if the priority is high enough and the block it's going into is small enough, then the transaction can be free, as long as none of the outputs are too small, in which case the base fee is charged instead.

Edit:  COIN is the number of satoshis in one bitcoin, which is 100,000,000.  The valuein for the purpose of priority is measured in satoshis.