1
0
Fork 0
forked from lthn/blockchain

validate_tx_semantic() fixed for post-HF4

This commit is contained in:
sowle 2023-02-27 21:26:30 +01:00
parent b1ccf8644b
commit 1ed33ce910
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC

View file

@ -81,10 +81,13 @@ namespace currency
// inexpensive check for pre-HF4 txs
// post-HF4 txs balance are being checked in check_tx_balance()
if (!check_tx_bare_balance(tx))
if (tx.version <= TRANSACTION_VERSION_PRE_HF4)
{
LOG_PRINT_RED_L0("balance check failed for tx " << get_transaction_hash(tx));
return false;
if (!check_tx_bare_balance(tx))
{
LOG_PRINT_RED_L0("balance check failed for tx " << get_transaction_hash(tx));
return false;
}
}
return true;