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

Open
natureisbestNFT opened this issue Jul 25, 2023 · 0 comments
Open

getFee behaviour does not match description #3612

natureisbestNFT opened this issue Jul 25, 2023 · 0 comments

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

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

No branches or pull requests

1 participant