mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-12-02 15:53:27 +01:00
Condition v2 txes on v3 hard fork
This commit is contained in:
parent
59a66e209a
commit
f5465d8246
@ -498,6 +498,15 @@ namespace cryptonote
|
|||||||
}
|
}
|
||||||
//std::cout << "!"<< tx.vin.size() << std::endl;
|
//std::cout << "!"<< tx.vin.size() << std::endl;
|
||||||
|
|
||||||
|
uint8_t version = m_blockchain_storage.get_current_hard_fork_version();
|
||||||
|
const size_t max_tx_version = version == 1 ? 1 : 2;
|
||||||
|
if (tx.version == 0 || tx.version > max_tx_version)
|
||||||
|
{
|
||||||
|
// v2 is the latest one we know
|
||||||
|
tvc.m_verifivation_failed = true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if(!check_tx_syntax(tx))
|
if(!check_tx_syntax(tx))
|
||||||
{
|
{
|
||||||
LOG_PRINT_L1("WRONG TRANSACTION BLOB, Failed to check tx " << tx_hash << " syntax, rejected");
|
LOG_PRINT_L1("WRONG TRANSACTION BLOB, Failed to check tx " << tx_hash << " syntax, rejected");
|
||||||
|
@ -84,7 +84,9 @@ namespace cryptonote
|
|||||||
tvc.m_verifivation_failed = true;
|
tvc.m_verifivation_failed = true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (tx.version > 2) // TODO: max 1/2 needs to be conditioned by a hard fork
|
|
||||||
|
const size_t max_tx_version = version == 1 ? 1 : 2;
|
||||||
|
if (tx.version > max_tx_version)
|
||||||
{
|
{
|
||||||
// v2 is the latest one we know
|
// v2 is the latest one we know
|
||||||
tvc.m_verifivation_failed = true;
|
tvc.m_verifivation_failed = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user