Tidy the comments at the end of _verify_input_amounts()
What changed, and why it matters
This commit only rewords and moves code comments in a single Python function. No executable code, logic, or behavior was changed. It is a documentation-style cleanup with no security relevance.
No action needed; the change is cosmetic.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff in src/seedsigner/models/psbt_parser.py adjusts comments inside _verify_input_amounts(). One comment is split across two lines and moved closer to the raise statement, and another comment is added above the verified_input_amount increment. No statements, conditions, or exception handling were modified.
Changed components
src/seedsigner/models/psbt_parser.pyInspect captured patch +2 / −1
### src/seedsigner/models/psbt_parser.py
@@ -408,12 +408,13 @@ def _verify_input_amounts(self):
# With both non_witness_utxo and witness_utxo present, compare them. verify() only
# proved the non_witness_utxo, so the witness_utxo must match its output at inp.vout.
- # Reject the psbt if their amounts or scripts contradict.
if inp.witness_utxo is not None:
prevout = inp.non_witness_utxo.vout[inp.vout]
if prevout.value != inp.witness_utxo.value or prevout.script_pubkey.data != inp.witness_utxo.script_pubkey.data:
+ # The amounts or scripts contradict. Reject the psbt.
raise PSBTInputAmountVerificationError(f"Input {i}: witness_utxo doesn't match verified non_witness_utxo")
+ # Every check passed, so this input amount is verified
verified_input_amount += inp.utxo.value
# Only assigned once every input has passed, so a rejected psbt leaves no partial totalWhy 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.