diff options
author | Zachary Michaels <mikezackles@gmail.com> | 2014-07-17 11:05:46 -0400 |
---|---|---|
committer | Zachary Michaels <mikezackles@gmail.com> | 2014-07-17 16:55:40 -0400 |
commit | d9f3421ce75ca4e429c0df2fd77993ff33f90289 (patch) | |
tree | 974a137d4ba2d62c794cbbb2e7ad60c13facf9ef /src/cryptonote_core | |
parent | Start fresh if tx_pool deserialize fails (diff) | |
download | monero-d9f3421ce75ca4e429c0df2fd77993ff33f90289.tar.xz |
Minimum tx fee for entering pool
Diffstat (limited to 'src/cryptonote_core')
-rw-r--r-- | src/cryptonote_core/tx_pool.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cryptonote_core/tx_pool.cpp b/src/cryptonote_core/tx_pool.cpp index dc71bd918..3c924d5e8 100644 --- a/src/cryptonote_core/tx_pool.cpp +++ b/src/cryptonote_core/tx_pool.cpp @@ -59,6 +59,14 @@ namespace cryptonote return false; } + uint64_t fee = inputs_amount - outputs_amount; + if (!kept_by_block && fee < DEFAULT_FEE) + { + LOG_ERROR("transaction fee is not enough: " << print_money(fee) << ", minumim fee: " << print_money(DEFAULT_FEE)); + tvc.m_verifivation_failed = true; + return false; + } + if (!kept_by_block && blob_size >= TRANSACTION_SIZE_LIMIT) { LOG_ERROR("transaction is too big: " << blob_size << " bytes, maximum size: " << TRANSACTION_SIZE_LIMIT); |