Skip to content

Add consolidate endpoint and adjust subtractfee logic#235

Merged
fassadlr merged 3 commits intostratisproject:masterfrom
zeptin:consolidate-20201129
Nov 30, 2020
Merged

Add consolidate endpoint and adjust subtractfee logic#235
fassadlr merged 3 commits intostratisproject:masterfrom
zeptin:consolidate-20201129

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.

2 participants