fix: use explicit SQL UPDATE for balance changes and add value field mapping

Changed transaction failure logging from error to warning level in PoA proposer.
Removed immediate session.commit() after state transition as balance changes are now persisted via explicit SQL UPDATE statements.
Added "value" field mapping from "amount" in transaction normalization and PoA proposer to ensure state transition compatibility.
Replaced SQLAlchemy ORM balance updates with explicit SQL UPDATE statements using
This commit is contained in:
aitbc
2026-04-25 20:08:09 +02:00
parent 8d69dd6685
commit e4df4caaeb
3 changed files with 18 additions and 9 deletions

View File

@@ -112,6 +112,7 @@ def _normalize_transaction_data(tx_data: Dict[str, Any], chain_id: str) -> Dict[
"from": sender.strip(),
"to": recipient.strip(),
"amount": amount,
"value": amount, # Add value field for state transition compatibility
"fee": fee,
"nonce": nonce,
"payload": payload,