handshake-org / handshake-org/hsd
wallet batches may exceed policy weight limit
Open
- Dominant language
- JavaScript
- Stars
- 2.1k
- Forks
- 306
- PR merge metrics
- No merged PRs in 30d
Description
the reason is because as we are building the batch, we only account for ONE funding input:
https://github.com/handshake-org/hsd/blob/master/lib/wallet/wallet.js#L3851-L3866
If the user's wallet needs to spend more than one coin to pay the fee for a batch, this size estimator will be wrong and the final TX will break the rule.
We could for example maybe call coin selector during the batch process and see how many inputs we'll need to fund the batch and take that size into account -- but i think that would mean calling `fund()` too many times during batching.
Contributor guide
Assessment
This issue has not been assessed yet.