question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature Request: PSBT creation should include unspentTargetCount

See original GitHub issue

unspentTargetCount Optional. When passed, the wallet will attempt to make sure the UTXO count of the wallet after this PSBT is signed and confirmed is equal to this number.


The use case for this:

  • In a wallet that periodically sends out transactions, keeping about 3-4 UTXOS in your wallet at all times makes it easy to ensure that one stuck transaction does not cause your wallet to choke up on the 25 unconfirmed tx chain limit… As it is unlikely that all 3 or all 4 of the “base” (confirmed) UTXOs will all accidentally be sent with low fees and get stuck.

Implementation ideas:

  • Simple: make this a “max” setting… then all you need to do is add some low value outpoints into the transaction as inputs to join everything together decreasing UTXO count to desired amount.
  • Complex: Have min and max… is trickier, because if UTXO count is too low, you must maybe create multiple change outputs to increase UTXO count, which then brings up many extra questions about how to handle explicitChangeAddress etc. etc…

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
NicolasDoriercommented, Aug 28, 2019

Very interesting. I need to think about how to do this, there is deep assumption in my transaction builder that there is only one change.

0reactions
NicolasDoriercommented, Jan 28, 2020

yes

Read more comments on GitHub >

github_iconTop Results From Across the Web

Peoples Security Bank & Trust: Your Community Bank
We have become one of the largest independent community banks in eastern Pennsylvania with a footprint stretching to Pennsylvania, New York & New...
Read more >
What is a Feature Request? Understanding User Feedback
Feature requests are ideas, comments, messages, or specific customer inquiries asking for a particular function to be added to your product. Typically, a...
Read more >
How do you raise Artifactory feature request?
You might want to submit a feature request to Artifactory for a missing feature or an improvement you want to see in Artifactory....
Read more >
Product Feature Requests - How to Write and Submit Them
Describes the Feature Request process and provides tips on how to write a Feature Request for best results.
Read more >
How to create a Feature Request - THWACK Documentation
Creating a Feature Request. Navigate to the Product Forum where you'd like to submit your feature request. Each product has its own section...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found