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

use Feerate instead of fee for sending tx. #309

Open
mojoX911 opened this issue Nov 23, 2024 · 1 comment · May be fixed by #343
Open

use Feerate instead of fee for sending tx. #309

mojoX911 opened this issue Nov 23, 2024 · 1 comment · May be fixed by #343
Assignees
Labels
enhancement This enhances the code and improves stuffs
Milestone

Comments

@mojoX911
Copy link

In all of the transaction creation function we are using fee instead of feerate, which is suboptimal.

For ex:

pub fn spend_from_wallet(
&mut self,
fee: Amount,
send_amount: SendAmount,
destination: Destination,
coins_to_spend: &[(ListUnspentResultEntry, UTXOSpendInfo)],

Change the input parameter from fee to feerate, and modify the calculations accordingly.

Caveat:
We will need to find the exact size of the input of the spending transaction to calculate the right fee form the feerate.

@mojoX911 mojoX911 added the enhancement This enhances the code and improves stuffs label Nov 23, 2024
@mojoX911 mojoX911 added this to the v0.1.0 milestone Nov 23, 2024
@KnowWhoami KnowWhoami self-assigned this Dec 10, 2024
@KnowWhoami
Copy link
Collaborator

Taking this up.

@mojoX911 mojoX911 moved this to todo in core lib Dec 19, 2024
@mojoX911 mojoX911 modified the milestones: v0.1.0, v0.1.1 Dec 26, 2024
@KnowWhoami KnowWhoami removed their assignment Dec 28, 2024
@mojoX911 mojoX911 removed the status in core lib Jan 15, 2025
@mojoX911 mojoX911 moved this to WIP in core lib Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This enhances the code and improves stuffs
Projects
Status: WIP
Development

Successfully merging a pull request may close this issue.

3 participants