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

gui: use descriptor helper function to get unsigned tx max size #882

Merged

Conversation

jp1ac4
Copy link
Collaborator

@jp1ac4 jp1ac4 commented Dec 14, 2023

This is to resolve #880 using the new helper function from #881 to get the max possible size of the unsigned transaction.

The following screenshot is taken using both new and old implementations together and shows the new estimated feerate changes from 0 to 1 sat/vbyte:
image

@jp1ac4
Copy link
Collaborator Author

jp1ac4 commented Dec 14, 2023

I'll leave this as draft until #881 has been merged.

Copy link
Member

@darosior darosior left a comment

Choose a reason for hiding this comment

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

Nice! Just need to make the GUI point back to master.

self.fee_amount.map(|a| {
a.to_sat()
.checked_div(self.max_vbytes)
.expect("max_vbytes should be greater than zero")
Copy link
Member

Choose a reason for hiding this comment

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

nit: Hopefully, yes! But why? I think that's the info which should go here. For instance "a PSBT with an empty unsigned_tx would never deserialize therefore this is never 0" or simply "a descriptor's satisfaction size is never 0".

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've now changed this to the second suggestion.

@jp1ac4 jp1ac4 force-pushed the gui-use-helper-unsigned-tx-max-size branch from 49ec4f5 to bf52982 Compare December 15, 2023 17:58
@jp1ac4 jp1ac4 force-pushed the gui-use-helper-unsigned-tx-max-size branch from bf52982 to e373ad4 Compare December 15, 2023 18:00
@jp1ac4 jp1ac4 marked this pull request as ready for review December 15, 2023 18:11
@jp1ac4
Copy link
Collaborator Author

jp1ac4 commented Dec 15, 2023

The GUI is now pointing to the latest master.

@darosior
Copy link
Member

ACK e373ad4

@darosior darosior merged commit 53fa081 into wizardsardine:master Dec 20, 2023
18 checks passed
@jp1ac4 jp1ac4 deleted the gui-use-helper-unsigned-tx-max-size branch December 20, 2023 16:32
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.

GUI: Estimated feerate displayed for PSBTs can be too low
2 participants