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

getFee behaviour does not match description #3612

Closed
natureisbestNFT opened this issue Jul 25, 2023 · 1 comment
Closed

getFee behaviour does not match description #3612

natureisbestNFT opened this issue Jul 25, 2023 · 1 comment

Comments

@natureisbestNFT
Copy link

* If there's no fee set and no change address,

  • If there's no fee set and no change address,
  • estimate the fee based on size.

line 1004:
// if no change output is set, fees should equal all the unspent amount
if (!this._changeScript) {
return this._getUnspentValue();
}

Comment for function says estimate fee, but if inputs=outputs it will return 0 instead of estimating. And even if they are
not equal it will return 'all the unspent amount' instead of estimating an appropriate fee.
So function does not do what it says it will.

This problem is the same for dogecoin
https://github.com/bitpay/bitcore/blob/master/packages/bitcore-lib-doge/lib/transaction/transaction.js#L999

@kajoseph
Copy link
Collaborator

I don't see that this is the case. I'm going to close this issue since it's stale and there have been updates to the fee estimation in the libs, but let me know if you're still experiencing this issue. If so, more details would be helpful such as the library version you're using and a code example.

@kajoseph kajoseph closed this as not planned Won't fix, can't repro, duplicate, stale Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants