Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.62 KB | None | 0 0
  1. commit 5e207b0d9bda615dfc573e6a8988abcc7159e5ce
  2. Author: Vadique Myself <vadiquemyself@gmail.com>
  3. Date: Sun Sep 22 14:40:26 2019 +0300
  4.  
  5. no forced transaction fees
  6.  
  7. diff --git a/src/validation.cpp b/src/validation.cpp
  8. index 5b27b9ec5..13ac60059 100644
  9. --- a/src/validation.cpp
  10. +++ b/src/validation.cpp
  11. @@ -783,7 +783,6 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
  12. dFreeCount *= pow(1.0 - 1.0/600.0, (double)(nNow - nLastTime));
  13. nLastTime = nNow;
  14. // -limitfreerelay unit is thousand-bytes-per-minute
  15. - // At default rate it would take over a month to fill 1GB
  16. if (dFreeCount + nSize >= GetArg("-limitfreerelay", DEFAULT_LIMITFREERELAY) * 10 * 1000)
  17. return state.DoS(0, false, REJECT_INSUFFICIENTFEE, "rate limited free transaction");
  18. LogPrint("mempool", "Rate limit dFreeCount: %g => %g\n", dFreeCount, dFreeCount+nSize);
  19. diff --git a/src/validation.h b/src/validation.h
  20. index de986e972..fd8750e41 100644
  21. --- a/src/validation.h
  22. +++ b/src/validation.h
  23. @@ -124,7 +124,7 @@ static const int64_t BLOCK_DOWNLOAD_TIMEOUT_BASE = 1000000;
  24. /** Additional block download timeout per parallel downloading peer (i.e. 5 min) */
  25. static const int64_t BLOCK_DOWNLOAD_TIMEOUT_PER_PEER = 500000;
  26.  
  27. -static const unsigned int DEFAULT_LIMITFREERELAY = 0;
  28. +static const unsigned int DEFAULT_LIMITFREERELAY = 128;
  29. static const bool DEFAULT_RELAYPRIORITY = true;
  30. static const int64_t DEFAULT_MAX_TIP_AGE = 24 * 60 * 60;
  31. /** Maximum age of our tip in seconds for us to be considered current for fee estimation */
  32. diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
  33. index 504852d68..8cb097208 100644
  34. --- a/src/wallet/wallet.cpp
  35. +++ b/src/wallet/wallet.cpp
  36. @@ -47,7 +47,7 @@ const char * DEFAULT_WALLET_DAT = "wallet.dat";
  37. const uint32_t BIP32_HARDENED_KEY_LIMIT = 0x80000000;
  38.  
  39. /**
  40. - * Fees smaller than this (in satoshi) are considered zero fee (for transaction creation)
  41. + * Fees smaller than this are considered zero fee (for transaction creation)
  42. * Override with -mintxfee
  43. */
  44. CFeeRate CWallet::minTxFee = CFeeRate(DEFAULT_TRANSACTION_MINFEE);
  45. @@ -3877,8 +3877,8 @@ bool CWallet::ParameterInteraction()
  46. fSendFreeTransactions = GetBoolArg("-sendfreetransactions", DEFAULT_SEND_FREE_TRANSACTIONS);
  47. fWalletRbf = GetBoolArg("-walletrbf", DEFAULT_WALLET_RBF);
  48.  
  49. - if (fSendFreeTransactions && GetArg("-limitfreerelay", DEFAULT_LIMITFREERELAY) <= 0)
  50. - return InitError("Creation of free transactions with their relay disabled is not supported.");
  51. + ///if (fSendFreeTransactions && GetArg("-limitfreerelay", DEFAULT_LIMITFREERELAY) <= 0)
  52. + ///return InitError("Creation of free transactions with their relay disabled is not supported.");
  53.  
  54. return true;
  55. }
  56. diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
  57. index 5f77a31ea..1f8a85ebd 100644
  58. --- a/src/wallet/wallet.h
  59. +++ b/src/wallet/wallet.h
  60. @@ -47,11 +47,11 @@ static const unsigned int DEFAULT_KEYPOOL_SIZE = 100;
  61. //! -paytxfee default
  62. static const CAmount DEFAULT_TRANSACTION_FEE = 0;
  63. //! -fallbackfee default
  64. -static const CAmount DEFAULT_FALLBACK_FEE = COIN;
  65. +static const CAmount DEFAULT_FALLBACK_FEE = 0;
  66. //! -mintxfee default
  67. -static const CAmount DEFAULT_TRANSACTION_MINFEE = COIN;
  68. +static const CAmount DEFAULT_TRANSACTION_MINFEE = 0;
  69. //! minimum recommended increment for BIP 125 replacement txs
  70. -static const CAmount WALLET_INCREMENTAL_RELAY_FEE = COIN * 5;
  71. +static const CAmount WALLET_INCREMENTAL_RELAY_FEE = COIN * 2;
  72. //! target minimum change amount
  73. static const CAmount MIN_CHANGE = CENT;
  74. //! final minimum change amount after paying for fees
  75. @@ -59,7 +59,7 @@ static const CAmount MIN_FINAL_CHANGE = MIN_CHANGE/2;
  76. //! Default for -spendzeroconfchange
  77. static const bool DEFAULT_SPEND_ZEROCONF_CHANGE = true;
  78. //! Default for -sendfreetransactions
  79. -static const bool DEFAULT_SEND_FREE_TRANSACTIONS = false;
  80. +static const bool DEFAULT_SEND_FREE_TRANSACTIONS = true;
  81. //! Default for -walletrejectlongchains
  82. static const bool DEFAULT_WALLET_REJECT_LONG_CHAINS = false;
  83. //! -txconfirmtarget default
  84. @@ -67,7 +67,7 @@ static const unsigned int DEFAULT_TX_CONFIRM_TARGET = 6;
  85. //! -walletrbf default
  86. static const bool DEFAULT_WALLET_RBF = false;
  87. //! Largest (in bytes) free transaction we're willing to create
  88. -static const unsigned int MAX_FREE_TRANSACTION_CREATE_SIZE = 0;
  89. +static const unsigned int MAX_FREE_TRANSACTION_CREATE_SIZE = 223556;
  90. static const bool DEFAULT_WALLETBROADCAST = true;
  91. static const bool DEFAULT_DISABLE_WALLET = false;
  92. //! if set, all keys will be derived by using BIP32
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement