handshake-org / handshake-org/hsd

wallet batches may exceed policy weight limit

Open
#774 1 comment 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.