diff --git a/Cargo.lock b/Cargo.lock index f6ce67fae5..62219938e6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2904,9 +2904,9 @@ dependencies = [ [[package]] name = "redb" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84b1de48a7cf7ba193e81e078d17ee2b786236eed1d3f7c60f8a09545efc4925" +checksum = "a7c2a94325f9c5826b17c42af11067230f503747f870117a28180e85696e21ba" dependencies = [ "libc", ] diff --git a/Cargo.toml b/Cargo.toml index 61874dfa51..80a8b1b40e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -50,7 +50,7 @@ mime_guess = "2.0.4" miniscript = "12.0.0" mp4 = "0.14.0" ordinals = { version = "0.0.13", path = "crates/ordinals" } -redb = "2.2.0" +redb = "2.3.0" ref-cast = "1.0.23" regex = "1.6.0" reqwest = { version = "0.11.27", features = ["blocking", "json"] } diff --git a/src/index.rs b/src/index.rs index 2695ebc7b7..924c795391 100644 --- a/src/index.rs +++ b/src/index.rs @@ -303,6 +303,7 @@ impl Index { let mut tx = database.begin_write()?; tx.set_durability(durability); + tx.set_quick_repair(true); tx.open_multimap_table(SAT_TO_SEQUENCE_NUMBER)?; tx.open_multimap_table(SCRIPT_PUBKEY_TO_OUTPOINT)?; @@ -773,6 +774,7 @@ impl Index { fn begin_write(&self) -> Result { let mut tx = self.database.begin_write()?; tx.set_durability(self.durability); + tx.set_quick_repair(true); Ok(tx) } diff --git a/src/wallet.rs b/src/wallet.rs index f050d35dc6..f7acdfe097 100644 --- a/src/wallet.rs +++ b/src/wallet.rs @@ -664,7 +664,8 @@ impl Wallet { { let database = Database::builder().create(&path)?; - let tx = database.begin_write()?; + let mut tx = database.begin_write()?; + tx.set_quick_repair(true); tx.open_table(RUNE_TO_ETCHING)?; @@ -688,7 +689,8 @@ impl Wallet { reveal: &Transaction, output: batch::Output, ) -> Result { - let wtx = self.database.begin_write()?; + let mut wtx = self.database.begin_write()?; + wtx.set_quick_repair(true); wtx.open_table(RUNE_TO_ETCHING)?.insert( rune.0, @@ -717,7 +719,8 @@ impl Wallet { } pub(crate) fn clear_etching(&self, rune: Rune) -> Result { - let wtx = self.database.begin_write()?; + let mut wtx = self.database.begin_write()?; + wtx.set_quick_repair(true); wtx.open_table(RUNE_TO_ETCHING)?.remove(rune.0)?; wtx.commit()?;