Skip to content

feat(psbt): use bigint values #39

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

Merged
merged 1 commit into from
Aug 30, 2022
Merged

feat(psbt): use bigint values #39

merged 1 commit into from
Aug 30, 2022

Conversation

brandonblack
Copy link

Issue: BG-56116

@brandonblack brandonblack requested a review from a team August 29, 2022 16:28
Copy link

@sangaman sangaman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just one comment.

this.data.inputs,
this.__CACHE,
)!;
return Number(
Copy link

@sangaman sangaman Aug 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the fee rate just be a bigint as well? It looks like this was already being floored to an integer, and it seems like the arithmetic would be simpler if it were all bigint since this would have to get cast back to bigint before it is multiplied by the tx size, which it looks like we're already doing in this PR.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davidkaplanbitgo noticed that in the Doge team's changes to transaction builder, they treat fee rates as number, so we were inclined to follow that pattern. I admit to being a bit torn about it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gonna leave a mental bookmark on this as we proceed with psbt/bigint-onlyifying things, and if it turns out to make more sense to make this a bigint too, we'll change it.

@brandonblack brandonblack merged commit 6624bd4 into master Aug 30, 2022
@brandonblack brandonblack deleted the bigint_psbt branch August 30, 2022 17:44
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

Successfully merging this pull request may close these issues.

3 participants