cargo: update fjall to v2.5

This commit is contained in:
nym21
2025-01-09 20:53:04 +01:00
parent 813f16ccee
commit 1212c3627b
3 changed files with 27 additions and 26 deletions
+14 -14
View File
@@ -366,7 +366,7 @@ checksum = "805ef2023ccd65425743a91ecd11fc020979a0b01921db3104fb606d18a7b43e"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.92",
"syn 2.0.95",
]
[[package]]
@@ -390,7 +390,7 @@ dependencies = [
"once_cell",
"proc-macro2",
"quote",
"syn 2.0.92",
"syn 2.0.95",
]
[[package]]
@@ -427,9 +427,9 @@ checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be"
[[package]]
name = "fjall"
version = "2.4.4"
version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9cd1bb382d52e527f10f5ed3f126bb4a87c77fbf878a1432010820a71aaa6322"
checksum = "80910a26e4fb5e5393ff64d293602ac1ade56cf4d14d244c02a7d4ddcd5f10bc"
dependencies = [
"byteorder",
"dashmap",
@@ -554,9 +554,9 @@ checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
[[package]]
name = "lsm-tree"
version = "2.4.0"
version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7952bc71e90c0b58ce441dcf6cf8624cac042125dec1183ec9c48144f74378d"
checksum = "4d858efa63a32a286a06aa3968f3ed09811d556697e9f9804aa72ea679ed3b83"
dependencies = [
"byteorder",
"crossbeam-skiplist",
@@ -860,7 +860,7 @@ checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.92",
"syn 2.0.95",
]
[[package]]
@@ -915,9 +915,9 @@ dependencies = [
[[package]]
name = "syn"
version = "2.0.92"
version = "2.0.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "70ae51629bf965c5c098cc9e87908a3df5301051a9e087d6f9bef5c9771ed126"
checksum = "46f71c0377baf4ef1cc3e3402ded576dccc315800fbc62dfc7fe04b009773b4a"
dependencies = [
"proc-macro2",
"quote",
@@ -1002,9 +1002,9 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"
[[package]]
name = "value-log"
version = "1.4.0"
version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7abc2af068c21c0b0531624fbdb5b2c950cf8e7dc72cedf77a9ec10bb677450f"
checksum = "1f90495556d09c3026f7f3897f8a7db59c8c701082e32dcf58c2319062ae1eb0"
dependencies = [
"byteorder",
"log",
@@ -1103,9 +1103,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[[package]]
name = "xxhash-rust"
version = "0.8.14"
version = "0.8.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d7d48f1b18be023c95e7b75f481cac649d74be7c507ff4a407c55cfb957f7934"
checksum = "fdd20c5420375476fbd4394763288da7eb0cc0b8c11deed431a91562af7335d3"
[[package]]
name = "zerocopy"
@@ -1125,5 +1125,5 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.92",
"syn 2.0.95",
]
+1 -1
View File
@@ -9,5 +9,5 @@ biter = "0.2.2"
color-eyre = "0.6.3"
ctrlc = "3.4.5"
derive_deref = "1.1.1"
fjall = "2.4.4"
fjall = "2.5.0"
rayon = "1.10.0"
+12 -11
View File
@@ -1,4 +1,9 @@
use std::{collections::BTreeMap, path::Path, str::FromStr, thread};
use std::{
collections::BTreeMap,
path::Path,
str::FromStr,
thread::{self},
};
use biter::{
bitcoin::{hashes::Hash, TxIn, TxOut, Txid},
@@ -18,8 +23,6 @@ use structs::{
// https://github.com/fjall-rs/fjall/discussions/72
// https://github.com/romanz/electrs/blob/master/doc/schema.md
const DAILY_BLOCK_TARGET: usize = 144;
const MONTHLY_BLOCK_TARGET: usize = DAILY_BLOCK_TARGET * 30;
const U16MAX: usize = u16::MAX as usize;
enum TxInOrAddresstxoutindex<'a> {
@@ -106,14 +109,14 @@ fn main() -> color_eyre::Result<()> {
}
if parts.height_to_blockhash.needs(height) {
wtx.insert(parts.height_to_blockhash.data(), Slice::from(height), blockhash);
wtx.insert(parts.height_to_blockhash.data(), Slice::from(height), &blockhash[..]);
}
if parts.height_to_first_addressindex.needs(height) {
wtx.insert(
parts.height_to_first_addressindex.data(),
Slice::from(height),
Slice::from(addressindex),
blockhash,
);
}
@@ -438,7 +441,7 @@ fn main() -> color_eyre::Result<()> {
}
if parts.txindex_to_txid.needs(height) {
wtx.insert(parts.txindex_to_txid.data(), Slice::from(txindex), txid);
wtx.insert(parts.txindex_to_txid.data(), Slice::from(txindex), &txid[..]);
}
match prev_txindex_slice_opt {
@@ -490,12 +493,12 @@ fn main() -> color_eyre::Result<()> {
if parts.height_to_last_addressindex.needs(height) {
wtx.insert(
parts.height_to_last_addressindex.data(),
Slice::from(height),
Slice::from(addressindex.decremented()),
blockhash,
);
}
let should_snapshot = _height % MONTHLY_BLOCK_TARGET == 0 && !exit.active();
let should_snapshot = _height % 100 == 0 && !exit.active();
if should_snapshot {
export(&keyspace, wtx, &parts, height)?;
wtx_opt.replace(keyspace.write_tx());
@@ -508,9 +511,7 @@ fn main() -> color_eyre::Result<()> {
Ok(())
})?;
// dbg!(i.elapsed());
// loop {}
dbg!(i.elapsed());
let wtx = wtx_opt.take().context("option should have wtx")?;
export(&keyspace, wtx, &parts, height)?;