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

Render closed-interval-ranges for human legibility. #3441

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

arik-so
Copy link
Contributor

@arik-so arik-so commented Apr 2, 2024

Currently, a satoshi range of [10; 12], which contains the elements {10, 11, 12}, would be rendered as 10-13. It's convenient for calculating its value, but highly misleading because it suggests that 13 is part of the interval, which it isn't.

The issue stems from the asymmetry of interval openness: the beginning of the interval is closed, and the ending is open.

To facilitate human legibility and convenience, the ends of intervals are now rendered as closed, too.

This PR might be controversial, so feel free to close.

@arik-so arik-so marked this pull request as draft April 2, 2024 06:03
@raphjaph
Copy link
Collaborator

raphjaph commented May 6, 2024

I like this. How about we just render it in the front-end as [10, 13) instead of 10-13?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants