fix: correct transaction value field from "value" to "amount" in PoA proposer
🔧 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:
@@ -151,7 +151,7 @@ class PoAProposer:
|
|||||||
tx_data = tx.content
|
tx_data = tx.content
|
||||||
sender = tx_data.get("sender")
|
sender = tx_data.get("sender")
|
||||||
recipient = tx_data.get("payload", {}).get("to")
|
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)
|
fee = tx_data.get("fee", 0)
|
||||||
|
|
||||||
if not sender or not recipient:
|
if not sender or not recipient:
|
||||||
|
|||||||
Reference in New Issue
Block a user