fix(UTXO): calc of txfee with change, min relay fee
Fixes for utxo tx fee calculation in UtxoTxBuilder::build() fn:
- include change output in txfee
- fix min relay tx fee calc (to multiply by tx_size).
UtxoTxBuilder::build() code was refactored to implement fixed txfee calc: made it similar to daemon code (with a loop), also broke it into functions. Existing tests updated for the fixed txfee.
Fixes issue: https://github.com/KomodoPlatform/komodo-defi-framework/issues/2313 (a test added to validate txfee from the issue). Should also fix https://github.com/KomodoPlatform/komodo-defi-framework/issues/1567 issue.
TODO: fix input size for segwit
@cipig
Is this ready for review?
Is this ready for review?
I am doing final checks and will change the status for ready after that
Thank you for this PR. Covers most of what I was working on here #2083.
I will close mine when this is approved.
Thank you for this PR. Covers most of what I was working on here #2083.
I will close mine when this is approved.
I thought #2083 was about fee priority (although this PR and #2083 definitely have some interception in txfee calc fixes)
Does this PR require and docs updates? I've created a docs PR at https://github.com/KomodoPlatform/komodo-docs-mdx/pull/416 for the related KF PR https://github.com/KomodoPlatform/komodo-defi-framework/pull/2083 please advise in the docs PR if anything else is needed.
@dimxy pr started to have conflicts
Does this PR require and docs updates? I've created a docs PR at KomodoPlatform/komodo-docs-mdx#416 for the related KF PR #2083 please advise in the docs PR if anything else is needed.
I don't thing so. It's a bug fix for tx fee calculation. No changes in any rpcs introduced.
Need this https://github.com/KomodoPlatform/komodo-defi-framework/pull/2316/commits/eab8902d28607bbe9e8d706ee4a854f92e7ec954 to be checked before I can merge this @dimxy