Drop the negative fee comment's claim that both totals are unverified
What changed, and why it matters
This commit only updates a code comment to remove an outdated claim. The actual security check for negative fees remains unchanged, and a prior code change already verifies input amounts before outputs are parsed. There is no functional security change in this commit.
No action required. This is a documentation-only comment update with no security relevance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit modifies a comment in psbt_parser.py. Previously the comment stated that both input and output totals were unverified coordinator claims when a negative fee was detected. A prior change to _verify_input_amounts() now validates every input amount before output parsing, making the comment inaccurate. The code behavior (raising PSBTNegativeFeeError when fee < 0) is unchanged.
Changed components
src/seedsigner/models/psbt_parser.pyInspect captured patch +3 / −4
### src/seedsigner/models/psbt_parser.py
@@ -744,10 +744,9 @@ def _parse_outputs(self, child_key_derivation_cache: dict):
self.spend_amount += vout[i].value
# embit computes the fee as inputs minus outputs and does not look at the sign of
- # the result. A negative fee means the outputs claim more than the inputs fund,
- # which no valid transaction can do. Both totals are the coordinator's own claims,
- # so this proves the psbt is malformed but not which side is false. Zero is left
- # alone: it is a pointless transaction, but not a malformed one.
+ # the result. A negative fee means the outputs spend more than the inputs hold,
+ # which no valid transaction can do. Zero is left alone: it is a pointless
+ # transaction, but not a malformed one.
self.fee_amount = self.psbt.fee()
if self.fee_amount < 0:
raise PSBTNegativeFeeError()Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.