aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2014-11-06 22:11:39 -0700
committerRiccardo Spagni <ric@spagni.net>2014-11-06 22:11:49 -0700
commit2b93288fd717bbe5ebf046dd45000aee8cb3da46 (patch)
tree43c531fd7e22f46ac9759db77144d09e0fda6937 /src/cryptonote_core
parentMerge pull request #182 (diff)
parentper kb fees not passing correct fee to transfer() (diff)
downloadmonero-2b93288fd717bbe5ebf046dd45000aee8cb3da46.tar.xz
Merge pull request #184
d2287d3 per kb fees not passing correct fee to transfer() (Thomas Winget) dc67b12 Should now properly do per-kb fee (Thomas Winget) 557e27f per kb fees (Thomas Winget)
Diffstat (limited to 'src/cryptonote_core')
-rw-r--r--src/cryptonote_core/tx_pool.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/cryptonote_core/tx_pool.cpp b/src/cryptonote_core/tx_pool.cpp
index 81f932014..f623037ee 100644
--- a/src/cryptonote_core/tx_pool.cpp
+++ b/src/cryptonote_core/tx_pool.cpp
@@ -86,9 +86,12 @@ namespace cryptonote
}
uint64_t fee = inputs_amount - outputs_amount;
- if (!kept_by_block && fee < DEFAULT_FEE)
+ uint64_t needed_fee = blob_size / 1024;
+ needed_fee += (blob_size % 1024) ? 1 : 0;
+ needed_fee *= FEE_PER_KB;
+ if (!kept_by_block && fee < needed_fee)
{
- LOG_PRINT_L1("transaction fee is not enough: " << print_money(fee) << ", minumim fee: " << print_money(DEFAULT_FEE));
+ LOG_PRINT_L1("transaction fee is not enough: " << print_money(fee) << ", minumim fee: " << print_money(needed_fee));
tvc.m_verifivation_failed = true;
return false;
}