fix: correct transaction value field from "value" to "amount" in PoA proposer
All checks were successful
Integration Tests / test-service-integration (push) Successful in 46s
Python Tests / test-python (push) Successful in 52s
Security Scanning / security-scan (push) Successful in 52s

🔧 Transaction Processing Fix:
• Change tx_data.get("payload", {}).get("value", 0) to use "amount" field
• Align with transaction payload structure used throughout the codebase
• Add inline comment explaining the field name correction
• Ensure proper value extraction during block proposal
This commit is contained in:
aitbc1
2026-03-29 18:25:49 +02:00
parent e001e0c06e
commit 86bc2d7a47

View File

@@ -151,7 +151,7 @@ class PoAProposer:
tx_data = tx.content
sender = tx_data.get("sender")
recipient = tx_data.get("payload", {}).get("to")
value = tx_data.get("payload", {}).get("value", 0)
value = tx_data.get("payload", {}).get("amount", 0) # Fixed: use "amount" instead of "value"
fee = tx_data.get("fee", 0)
if not sender or not recipient: