-
Notifications
You must be signed in to change notification settings - Fork 134
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
Remove deprecated API of bincode module. #32
Conversation
Hi @vincenzopalazzo, thanks for the PR! We actually did this before and ended up reverting it because it was causing some issues. We should update the code to use the new bincode API, but it requires doing some more testing first. |
Hi @shesek, I got it, I'm waiting for the electrics indexing on my laptop, maybe I can try to reproduce the bug and try to make some test on it. If you agree, is it possible to move this PR as a draft? or you preferer to close it? |
It would be great if you tried to reproduce it, thanks! It's possible that this issue only affects existing databases that were populated using |
I got it, thanks, I will restart the sync on the weekend because I had some full memory during my work 😄 . I hope to return here with a good result |
This commit is an API migration from a deprecated API that is bincode::config() to new API that is bincode::option() The following warning are removed during the building operation ```bash warning: use of deprecated function `bincode::config`: please use `options()` instead --> src/new_index/schema.rs:1442:9 | 1442 | bincode::config() | ^^^^^^^^^^^^^^^ | = note: `#[warn(deprecated)]` on by default warning: use of deprecated function `bincode::config`: please use `options()` instead --> src/new_index/schema.rs:1450:18 | 1450 | key: bincode::config().big_endian().serialize(&self.key).unwrap(), | ^^^^^^^^^^^^^^^ warning: use of deprecated function `bincode::config`: please use `options()` instead --> src/new_index/schema.rs:1456:19 | 1456 | let key = bincode::config() | ^^^^^^^^^^^^^^^ warning: 3 warnings emitted ``` Signed-off-by: Vincenzo Palazzo <[email protected]>
…flow fix missing prevout tx fee underflow
Sorry, I pushed something to my personal fork and for some reason it took the PR references from the mempool repo and converted them to this repo and made a mention, bumping the issue. Looks like a bug with GitHub. |
@shesek We fixed this in mempool. The issue was that the new defaults for the You can check the PR, but essentially: /// This is the default settings for Options,
/// but all explicitly spelled out, except for endianness.
/// The following functions will add endianness.
#[inline]
fn options() -> impl Options {
bincode::options()
.with_fixint_encoding()
.with_no_limit()
.allow_trailing_bytes()
}
/// Adding the endian flag for big endian
#[inline]
fn big_endian() -> impl Options {
options().with_big_endian()
}
/// Adding the endian flag for little endian
#[inline]
fn little_endian() -> impl Options {
options().with_little_endian()
} |
This PR is an API migration from a deprecated API that is
bincode::config()
tonew API that is
bincode::option()
The following warning is removed during the building operation
I hope this can be helpful