Simplify the outpoint bounds check comment
What changed, and why it matters
This commit only rewords an inline code comment to be clearer and slightly shorter. No actual code logic, behavior, or security checks were changed. The bounds check that protects against an out-of-range transaction output index remains exactly the same.
No action needed. This is a non-functional documentation/comment cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff in src/seedsigner/models/psbt_parser.py is a pure comment edit. The existing if-statement that raises PSBTMissingInputUtxoError when inp.vout >= len(inp.non_witness_utxo.vout) is untouched. The comment text was simplified from three lines to two lines, removing the note that the check prevents an IndexError in later lookups. No functional or security change is present.
Changed components
src/seedsigner/models/psbt_parser.pyInspect captured patch +2 / −3
### src/seedsigner/models/psbt_parser.py
@@ -374,9 +374,8 @@ def _verify_input_amounts(self):
"""
verified_input_amount = 0
for i, inp in enumerate(self.psbt.inputs):
- # Make sure inp.vout, the output this input claims to spend, actually exists in the
- # non_witness_utxo. Otherwise the lookups below raise an IndexError instead of
- # rejecting the psbt.
+ # Make sure the output that this input claims to spend (inp.vout) actually exists
+ # in the non_witness_utxo.
if inp.non_witness_utxo and inp.vout >= len(inp.non_witness_utxo.vout):
raise PSBTMissingInputUtxoError(
f"Input {i}: outpoint index {inp.vout} is out of range of its non_witness_utxo")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.