kaspanet / kaspad

Kaspad is the reference full node Kaspa implementation written in Go (golang).
ISC License
440 stars 227 forks source link

Adapt wallet UTXO selection to dust patch #2254

Closed michaelsutton closed 7 months ago

michaelsutton commented 7 months ago

Applies a fix to the wallet UTXO selection algorithm: if the created transaction has a change output (and thus 2 outputs overall), try having at least 2 inputs as well (in order to not be slowed down by dust patch).

Note that the auto-compound case does not require any adjustments. If the last tx in the compound op has a single input, there wouldn't be a need for the last level in the compound tree

codecov[bot] commented 7 months ago

Codecov Report

Attention: 17 lines in your changes are missing coverage. Please review.

Comparison is base (8e71f79) 58.90% compared to head (ad1a49c) 58.89%. Report is 2 commits behind head on dev.

Files Patch % Lines
cmd/kaspawallet/send.go 0.00% 14 Missing :warning:
...allet/daemon/server/create_unsigned_transaction.go 0.00% 1 Missing :warning:
.../consensus/processes/blockbuilder/block_builder.go 66.66% 0 Missing and 1 partial :warning:
domain/miningmanager/mempool/mempool.go 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #2254 +/- ## ========================================== - Coverage 58.90% 58.89% -0.01% ========================================== Files 679 679 Lines 33243 33243 ========================================== - Hits 19582 19580 -2 - Misses 10814 10817 +3 + Partials 2847 2846 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.