diff --git a/Cargo.lock b/Cargo.lock index dca29a6..27af853 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -601,9 +601,9 @@ dependencies = [ [[package]] name = "blockstore" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4bf477ceba49f5eae2be7e54fe2cae4406a6f90921b21f4bb1a779b4f517649" +checksum = "358358b19add120a5afc3dd1c8e9161d6d06c44dfec2ef8da58b7fe5c369c90d" dependencies = [ "cid", "dashmap", diff --git a/Cargo.toml b/Cargo.toml index 3605707..0b7593a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,11 +4,24 @@ version = "0.1.0" edition = "2021" license = "Apache-2.0" description = "Implementation of bitswap protocol for libp2p" +authors = ["Eiger "] +homepage = "https://www.eiger.co" +readme = "README.md" rust-version = "1.75" +repository = "https://github.com/eigerco/beetswap" +# crates.io is limited to 5 keywords and 5 categories +keywords = ["bitswap", "blockstore", "ipld", "cid"] +# Must be one of +categories = [ + "asynchronous", + "cryptography::cryptocurrencies", + "network-programming", + "wasm", +] [dependencies] asynchronous-codec = "0.7" -blockstore = "0.4" +blockstore = "0.5" bytes = "1" cid = "0.11" fnv = "1.0.5" @@ -36,13 +49,15 @@ libp2p-noise = "0.44" libp2p-stream = "0.1.0-alpha" libp2p-swarm-test = "0.3.0" libp2p-yamux = "0.45" -log = "0.4.18" # needed for minimal-versions multihash = "0.19" multihash-codetable = { version = "0.1", features = ["digest", "sha2"] } tokio = { version = "1", features = ["rt", "macros", "time", "sync"] } tracing-appender = "0.2.2" tracing-subscriber = { version = "0.3.17", features = ["env-filter"] } +# needed for minimal-versions +log = "0.4.18" + [features] wasm-bindgen = ["futures-timer/wasm-bindgen", "instant/wasm-bindgen"] diff --git a/src/client.rs b/src/client.rs index 460e6e6..d655d04 100644 --- a/src/client.rs +++ b/src/client.rs @@ -6,7 +6,7 @@ use std::time::Duration; use std::{fmt, mem}; use asynchronous_codec::FramedWrite; -use blockstore::{Blockstore, BlockstoreError}; +use blockstore::Blockstore; use cid::CidGeneric; use fnv::{FnvHashMap, FnvHashSet}; use futures_timer::Delay; @@ -56,9 +56,9 @@ enum TaskResult { Get( QueryId, CidGeneric, - Result>, BlockstoreError>, + Result>, blockstore::Error>, ), - Set(Result, Vec)>, BlockstoreError>), + Set(Result, Vec)>, blockstore::Error>), Cancelled, } diff --git a/src/lib.rs b/src/lib.rs index 40df100..9dccc76 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,7 +4,7 @@ use std::sync::Arc; use std::task::{ready, Context, Poll}; -use blockstore::{Blockstore, BlockstoreError}; +use blockstore::Blockstore; use cid::CidGeneric; use client::SendingState; use futures_util::stream::{SelectAll, StreamExt}; @@ -85,7 +85,7 @@ pub enum Error { /// Error received when interacting with blockstore #[error("Blockstore error: {0}")] - Blockstore(#[from] BlockstoreError), + Blockstore(#[from] blockstore::Error), } /// Alias for a [`Result`] with the error type [`beetswap::Error`]. diff --git a/src/server.rs b/src/server.rs index d194108..e778bdf 100644 --- a/src/server.rs +++ b/src/server.rs @@ -5,7 +5,7 @@ use std::sync::Arc; use std::task::{ready, Context, Poll}; use asynchronous_codec::FramedWrite; -use blockstore::{Blockstore, BlockstoreError}; +use blockstore::Blockstore; use cid::CidGeneric; use fnv::{FnvHashMap, FnvHashSet}; use futures_util::sink::SinkExt; @@ -58,7 +58,7 @@ enum TaskResult { struct GetCidResult { cid: CidGeneric, - data: Result>, BlockstoreError>, + data: Result>, blockstore::Error>, } #[derive(Debug, Default)]