Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add consolidate endpoint and adjust subtractfee logic #235

Merged
merged 3 commits into from
Nov 30, 2020

Conversation

zeptin
Copy link
Collaborator

@zeptin zeptin commented Nov 29, 2020

This is a useful function for managing wallets with large numbers of UTXOs.

There was also an undesired limitation on the SubtractFeeFromAmount flag whereby it required the TransactionFee to be set on the build context. This relaxes that requirement, but only when a single recipient has the flag set. Fortunately, many common use cases only need a single recipient to have the flag set.

@zeptin zeptin requested a review from fassadlr November 29, 2020 17:12
@zeptin
Copy link
Collaborator Author

zeptin commented Nov 29, 2020

Testnet consolidation within single address:

https://chainz.cryptoid.info/strax-test/tx.dws?305911.htm

Testnet consolidation within wallet account:

https://chainz.cryptoid.info/strax-test/block.dws?133765.htm

@fassadlr fassadlr merged commit c80f71f into stratisproject:master Nov 30, 2020
fassadlr pushed a commit that referenced this pull request Nov 30, 2020
* Add consolidate endpoint and adjust subtractfee logic

* Fix and augment tests

* Update src/Stratis.Bitcoin.Features.Wallet/Services/WalletService.cs
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.

None yet

2 participants