mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-08 17:30:36 +02:00
Merge pull request #2577 from gavinandresen/fee_bandaid
Treat dust outputs as non-standard, un-hardcode TX_FEE constants
This commit is contained in:
22
src/init.cpp
22
src/init.cpp
@ -582,6 +582,28 @@ bool AppInit2(boost::thread_group& threadGroup)
|
||||
const char* pszP2SH = "/P2SH/";
|
||||
COINBASE_FLAGS << std::vector<unsigned char>(pszP2SH, pszP2SH+strlen(pszP2SH));
|
||||
|
||||
// Fee-per-kilobyte amount considered the same as "free"
|
||||
// If you are mining, be careful setting this:
|
||||
// if you set it to zero then
|
||||
// a transaction spammer can cheaply fill blocks using
|
||||
// 1-satoshi-fee transactions. It should be set above the real
|
||||
// cost to you of processing a transaction.
|
||||
if (mapArgs.count("-mintxfee"))
|
||||
{
|
||||
int64 n = 0;
|
||||
if (ParseMoney(mapArgs["-mintxfee"], n) && n > 0)
|
||||
CTransaction::nMinTxFee = n;
|
||||
else
|
||||
return InitError(strprintf(_("Invalid amount for -mintxfee=<amount>: '%s'"), mapArgs["-mintxfee"].c_str()));
|
||||
}
|
||||
if (mapArgs.count("-minrelaytxfee"))
|
||||
{
|
||||
int64 n = 0;
|
||||
if (ParseMoney(mapArgs["-minrelaytxfee"], n) && n > 0)
|
||||
CTransaction::nMinRelayTxFee = n;
|
||||
else
|
||||
return InitError(strprintf(_("Invalid amount for -minrelaytxfee=<amount>: '%s'"), mapArgs["-minrelaytxfee"].c_str()));
|
||||
}
|
||||
|
||||
if (mapArgs.count("-paytxfee"))
|
||||
{
|
||||
|
Reference in New Issue
Block a user