Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
Update `sqlite` dependency to 0.32.0
cloudhead committed 2 years ago
commit f0754330c9e7e89b278a21626288e9f428b879d5
parent f9df360171b64ffa7e3cbe96a3145330dabc3d86
8 files changed +16 -14
modified Cargo.lock
@@ -3129,9 +3129,9 @@ dependencies = [

[[package]]
name = "sqlite"
-
version = "0.31.0"
+
version = "0.32.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "f3ddda64c469a257a3b31298805427784d992c226c94b81003f96e8b122286ad"
+
checksum = "03801c10193857d6a4a71ec46cee198a15cbc659622aabe1db0d0bdbefbcf8e6"
dependencies = [
 "libc",
 "sqlite3-sys",
modified radicle-crypto/Cargo.toml
@@ -22,7 +22,7 @@ fastrand = { version = "2.0.0", default-features = false, optional = true }
multibase = { version = "0.9.1" }
ec25519 = { version = "0.1.0", features = [] }
serde = { version = "1", features = ["derive"] }
-
sqlite = { version = "0.31.0", optional = true }
+
sqlite = { version = "0.32.0", optional = true }
thiserror = { version = "1" }
zeroize = { version = "1.5.7" }

modified radicle-node/Cargo.toml
@@ -31,7 +31,7 @@ qcheck = { version = "1", default-features = false, optional = true }
# N.b. this is required to use macros, even though it's re-exported
# through radicle
radicle-git-ext = { version = "0.6.0", features = ["serde"] }
-
sqlite = { version = "0.31.0" }
+
sqlite = { version = "0.32.0" }
scrypt = { version = "0.10.0", default-features = false }
serde = { version = "1", features = ["derive"] }
serde_json = { version = "1", features = ["preserve_order"] }
modified radicle-node/src/service/gossip/store.rs
@@ -39,7 +39,7 @@ impl GossipStore {
    pub fn open<P: AsRef<Path>>(path: P) -> Result<Self, Error> {
        let db = sql::Connection::open_with_flags(
            path,
-
            sqlite::OpenFlags::new().set_read_write().set_full_mutex(),
+
            sqlite::OpenFlags::new().with_read_write().with_full_mutex(),
        )?;

        Ok(Self { db })
modified radicle/Cargo.toml
@@ -26,7 +26,7 @@ serde = { version = "1", features = ["derive"] }
serde_json = { version = "1", features = ["preserve_order"] }
siphasher = { version = "0.3.10" }
radicle-git-ext = { version = "0.6.0", features = ["serde"] }
-
sqlite = { version = "0.31.0", features = ["bundled"] }
+
sqlite = { version = "0.32.0", features = ["bundled"] }
tempfile = { version = "3.3.0" }
thiserror = { version = "1" }
unicode-normalization = { version = "0.1" }
modified radicle/src/node/address/store.rs
@@ -53,9 +53,9 @@ impl Book {
        let db = sql::Connection::open_with_flags(
            path,
            sqlite::OpenFlags::new()
-
                .set_create()
-
                .set_read_write()
-
                .set_full_mutex(),
+
                .with_create()
+
                .with_read_write()
+
                .with_full_mutex(),
        )?;
        db.execute(Self::SCHEMA)?;

@@ -65,7 +65,7 @@ impl Book {
    /// Same as [`Self::open`], but in read-only mode. This is useful to have multiple
    /// open databases, as no locking is required.
    pub fn reader<P: AsRef<Path>>(path: P) -> Result<Self, Error> {
-
        let db = sql::Connection::open_with_flags(path, sqlite::OpenFlags::new().set_read_only())?;
+
        let db = sql::Connection::open_with_flags(path, sqlite::OpenFlags::new().with_read_only())?;
        db.execute(Self::SCHEMA)?;

        Ok(Self { db })
modified radicle/src/node/routing.rs
@@ -66,7 +66,7 @@ impl Table {
    /// open databases, as no locking is required.
    pub fn reader<P: AsRef<Path>>(path: P) -> Result<Self, Error> {
        let mut db =
-
            sql::Connection::open_with_flags(path, sqlite::OpenFlags::new().set_read_only())?;
+
            sql::Connection::open_with_flags(path, sqlite::OpenFlags::new().with_read_only())?;
        db.set_busy_timeout(DB_READ_TIMEOUT.as_millis() as usize)?;
        db.execute(Self::SCHEMA)?;

modified radicle/src/node/tracking/store.rs
@@ -55,7 +55,7 @@ impl Config<Read> {
    /// open databases, as no locking is required.
    pub fn reader<P: AsRef<Path>>(path: P) -> Result<Self, Error> {
        let mut db =
-
            sql::Connection::open_with_flags(path, sqlite::OpenFlags::new().set_read_only())?;
+
            sql::Connection::open_with_flags(path, sqlite::OpenFlags::new().with_read_only())?;
        db.set_busy_timeout(DB_READ_TIMEOUT.as_millis() as usize)?;
        db.execute(Self::SCHEMA)?;

@@ -67,8 +67,10 @@ impl Config<Read> {

    /// Create a new in-memory address book.
    pub fn memory() -> Result<Self, Error> {
-
        let db =
-
            sql::Connection::open_with_flags(":memory:", sqlite::OpenFlags::new().set_read_only())?;
+
        let db = sql::Connection::open_with_flags(
+
            ":memory:",
+
            sqlite::OpenFlags::new().with_read_only(),
+
        )?;
        db.execute(Self::SCHEMA)?;

        Ok(Self {