mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02:00
Separate required fee for relaying and creation
Transactions created with the new minimal fee policy would not be relayed by the network. Therefore, we separate the minimal fee that is necessary to relay and to create, leaving the creation one at the old amount, for now.
This commit is contained in:
parent
e426776598
commit
2bfda1be11
2 changed files with 13 additions and 10 deletions
|
|
@ -731,13 +731,13 @@ bool CTransaction::AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs, bool* pfMi
|
|||
}
|
||||
|
||||
// Don't accept it if it can't get into a block
|
||||
if (nFees < GetMinFee(1000))
|
||||
if (nFees < GetMinFee(1000, false, true))
|
||||
return error("AcceptToMemoryPool() : not enough fees");
|
||||
|
||||
// Continuously rate-limit free transactions
|
||||
// This mitigates 'penny-flooding' -- sending thousands of free transactions just to
|
||||
// be annoying or make other's transactions take longer to confirm.
|
||||
if (nFees < MIN_TX_FEE)
|
||||
if (nFees < MIN_RELAY_TX_FEE)
|
||||
{
|
||||
static CCriticalSection cs;
|
||||
static double dFreeCount;
|
||||
|
|
@ -3329,7 +3329,7 @@ CBlock* CreateNewBlock(CReserveKey& reservekey)
|
|||
|
||||
// Transaction fee required depends on block size
|
||||
bool fAllowFree = (nBlockSize + nTxSize < 4000 || CTransaction::AllowFree(dPriority));
|
||||
int64 nMinFee = tx.GetMinFee(nBlockSize, fAllowFree);
|
||||
int64 nMinFee = tx.GetMinFee(nBlockSize, fAllowFree, true);
|
||||
|
||||
// Connecting shouldn't fail due to dependency on other memory pool transactions
|
||||
// because we're already processing them in order of dependency
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue