aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-07-27 10:10:38 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-08-28 21:29:51 +0100
commit1bf069825b368071db576a6f9139b7773f20f7c1 (patch)
tree82567337755b8cfdd3cc4606025116b18d525da7 /src/cryptonote_core
parentchange fork settings to allow pre-rct txes for one more fork cycle (diff)
downloadmonero-1bf069825b368071db576a6f9139b7773f20f7c1.tar.xz
tx_pool: log why a transaction was rejected for version checks
Diffstat (limited to 'src/cryptonote_core')
-rw-r--r--src/cryptonote_core/tx_pool.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cryptonote_core/tx_pool.cpp b/src/cryptonote_core/tx_pool.cpp
index 3666088f1..e7d3908e5 100644
--- a/src/cryptonote_core/tx_pool.cpp
+++ b/src/cryptonote_core/tx_pool.cpp
@@ -81,6 +81,7 @@ namespace cryptonote
if (tx.version == 0)
{
// v0 never accepted
+ LOG_PRINT_L1("transaction version 0 is invalid");
tvc.m_verifivation_failed = true;
return false;
}
@@ -88,12 +89,14 @@ namespace cryptonote
const size_t max_tx_version = (version <= 3) ? 1 : 2;
if (tx.version > max_tx_version)
{
+ LOG_PRINT_L1("transaction version " << (unsigned)tx.version << " is higher than max accepted version " << max_tx_version);
tvc.m_verifivation_failed = true;
return false;
}
const size_t min_tx_version = (version >= 5) ? 2 : 1;
if (tx.version < min_tx_version)
{
+ LOG_PRINT_L1("transaction version " << (unsigned)tx.version << " is lower than min accepted version " << min_tx_version);
tvc.m_verifivation_failed = true;
return false;
}