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

Use bincode's new API, add utility functions for safer use #70

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

shesek
Copy link
Collaborator

@shesek shesek commented Feb 15, 2024

This resolves the deprecation warnings for the old bincode::config(), and adds wrapper utility functions that explicitly spells out whether serialization should use little or big endianness.

Switching from bincode::config() to bincode::options() changed the default settings, which requires explicitly enabling with_fixint_encoding and allow_trailing_bytes to restore the old behaviour.

Thanks @junderw for the investigative work and writing the code this is based on (mempool/electrs#34).

This resolves the deprecation warnings for the old `bincode::config()`,
and adds wrapper utility functions that explicitly spells out whether
serialization should use little or big endianness.

Switching from `bincode::config()` to `bincode::options()` changed the
default settings, which requires explicitly enabling `with_fixint_encoding`
and `allow_trailing_bytes` to restore the old behaviour.

Thanks @junderw for the investigative work and writing the code this is
based on (mempool/electrs#34).
@shesek
Copy link
Collaborator Author

shesek commented Feb 15, 2024

I verified DB compatibility by creating a database with 3a10582 (the current new-index tip) and loading it with this PR, for both Bitcoin and Liquid modes.

@LeoComandini
Copy link
Collaborator

utACK 0739d50, code review

@shesek shesek merged commit 01bd5f9 into Blockstream:new-index Feb 16, 2024
1 check passed
junderw pushed a commit to junderw/electrs that referenced this pull request May 1, 2024
…cast

Feature: Configurable loop delay and bitcoind-only broadcast endpoint
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.

2 participants