tx_pool: log why a transaction was rejected for version checks
This commit is contained in:
parent
37bdf6ebe3
commit
1bf069825b
|
@ -81,6 +81,7 @@ namespace cryptonote
|
||||||
if (tx.version == 0)
|
if (tx.version == 0)
|
||||||
{
|
{
|
||||||
// v0 never accepted
|
// v0 never accepted
|
||||||
|
LOG_PRINT_L1("transaction version 0 is invalid");
|
||||||
tvc.m_verifivation_failed = true;
|
tvc.m_verifivation_failed = true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -88,12 +89,14 @@ namespace cryptonote
|
||||||
const size_t max_tx_version = (version <= 3) ? 1 : 2;
|
const size_t max_tx_version = (version <= 3) ? 1 : 2;
|
||||||
if (tx.version > max_tx_version)
|
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;
|
tvc.m_verifivation_failed = true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const size_t min_tx_version = (version >= 5) ? 2 : 1;
|
const size_t min_tx_version = (version >= 5) ? 2 : 1;
|
||||||
if (tx.version < min_tx_version)
|
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;
|
tvc.m_verifivation_failed = true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue