From 86bc2d7a4777a033bbe175165faf6fdd2fcf0b26 Mon Sep 17 00:00:00 2001 From: aitbc1 Date: Sun, 29 Mar 2026 18:25:49 +0200 Subject: [PATCH] fix: correct transaction value field from "value" to "amount" in PoA proposer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🔧 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 --- apps/blockchain-node/src/aitbc_chain/consensus/poa.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/blockchain-node/src/aitbc_chain/consensus/poa.py b/apps/blockchain-node/src/aitbc_chain/consensus/poa.py index 14ad42a0..22924a02 100755 --- a/apps/blockchain-node/src/aitbc_chain/consensus/poa.py +++ b/apps/blockchain-node/src/aitbc_chain/consensus/poa.py @@ -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: