coinselect icon indicating copy to clipboard operation
coinselect copied to clipboard

Remove default sizes

Open karelbilek opened this issue 8 years ago • 7 comments

I didn't like the TX_INPUT_PUBKEYHASH and TX_OUTPUT_PUBKEYHASH in utils.js, because it might cause problems later (with some refactoring, or segwit lengths, etc).

It turned out to be bigger code change than I thought....

it's not that burning, and it's a big change in the end, so maybe it can wait after the other PRs

karelbilek avatar Aug 14 '17 12:08 karelbilek

It would be a breaking change too, as you are forcing script.length to be defined?

dcousens avatar Aug 15 '17 00:08 dcousens

Yes. I thought it would be better, since the caller can't accidentally forget it, at which point it fallbacks to default - and maybe wrong, if it's P2SH/native segwit/....

It is an API breaking change

karelbilek avatar Aug 15 '17 12:08 karelbilek

ACK to breaking change. Options object for the defaults though. :+1:

dcousens avatar Aug 15 '17 12:08 dcousens

I don't want users constantly guessing what their input lengths might be though.

Could we provide an options object that had nice defaults for unspecified input lengths maybe?

dcousens avatar Aug 15 '17 12:08 dcousens

This is high priority.

dcousens avatar Sep 14 '18 04:09 dcousens

Any bandwidth to get this through?

tiero avatar Feb 24 '20 18:02 tiero

Comments should be addressed

You are free to overtake this PR, I have stopped any bitcoin-related development :)

karelbilek avatar Feb 25 '20 02:02 karelbilek