Skip to content

Conversation

@Mshehu5
Copy link
Contributor

@Mshehu5 Mshehu5 commented Jan 2, 2026

This PR closes: #861

As mentioned in the issue contribute_inputs would allow duplicate PSBT inputs multiple times

As spacebear pointed our

I'm slightly concerned that this could result in duplicate inputs if contribute_inputs was called multiple times with the same inputs for some reason. Maybe it should filter for unique new inputs

Pull Request Checklist

Please confirm the following before requesting review:

Previously, contribute_inputs would allow duplicate inputs to be added to the transaction. This could lead to invalid transactions if the same input was contributed multiple times or if an input was added that already existed in the transaction.
This adds deduplication logic that filters new inputs to exclude any that reference already-seen
@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 20663993006

Details

  • 7 of 7 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.006%) to 82.909%

Totals Coverage Status
Change from base Build 20617301558: 0.006%
Covered Lines: 9673
Relevant Lines: 11667

💛 - Coveralls

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.

De-duplicate inputs in contribute_inputs

2 participants