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

wallet batches may exceed policy weight limit #774

Open
pinheadmz opened this issue Oct 11, 2022 · 1 comment
Open

wallet batches may exceed policy weight limit #774

pinheadmz opened this issue Oct 11, 2022 · 1 comment

Comments

@pinheadmz
Copy link
Member

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.

@nglabs42
Copy link

nglabs42 commented Oct 11, 2022

I was able to send 10 HNS from myself to myself (same wallet) and then send the sendbatch '[["REVEAL"]]' was able to sent within the next block.

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

2 participants