refactor: make code more readable and early exit#1
Open
polespinasa wants to merge 1 commit intoBicaru20:2026-02-12-check-sig-owned-infrom
Open
refactor: make code more readable and early exit#1polespinasa wants to merge 1 commit intoBicaru20:2026-02-12-check-sig-owned-infrom
polespinasa wants to merge 1 commit intoBicaru20:2026-02-12-check-sig-owned-infrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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()orPSBTInputSigned(). 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=trueonce it is changed tofalse.