Skip to content

refactor: make code more readable and early exit#1

Open
polespinasa wants to merge 1 commit intoBicaru20:2026-02-12-check-sig-owned-infrom
polespinasa:2026-02-12-check-sig-owned-in
Open

refactor: make code more readable and early exit#1
polespinasa wants to merge 1 commit intoBicaru20:2026-02-12-check-sig-owned-infrom
polespinasa:2026-02-12-check-sig-owned-in

Conversation

@polespinasa
Copy link

Overall the code looks good and I think it does what is intended to do.

It can be more clean and readable as this PR suggest. Long lines of code with a lot of class attributes calls and pointers are close to unreadable.
Also the if else structure is cleaner and avoid repeating calls such as IsMine() or PSBTInputSigned(). Normally we want to avoid duplicating code.

At the same time there is a small improvement. The only thing this loop does is check if the inputs are signed. At the moment we find one intput that is not signed we can early exit. It is impossible to set complete=true once it is changed to false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant