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

[Enhancement] Consider replacing string representation for ChainEpoch. #4272

Open
ruseinov opened this issue Apr 29, 2024 · 0 comments
Open

Comments

@ruseinov
Copy link
Contributor

ruseinov commented Apr 29, 2024

This would work, we just need to make sure to convert a potential try_into error into something readable.

i64::from_le_bytes(self.db.read_bin(SETTINGS_KEY)?.unwrap_or_default().try_into()?)

Edit: Actually, now that I think about it - unwrap_or_default might need to be replaced with 0::to_le_bytes or something along those lines.

Originally posted by @aatifsyed in #4270 (comment)

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

1 participant