Skip to content

Commit

Permalink
Upgrade to redb 0.13.0 (ordinals#1513)
Browse files Browse the repository at this point in the history
  • Loading branch information
hantuzun authored Feb 6, 2023
1 parent 4877255 commit 358073a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ mime_guess = "2.0.4"
miniscript = "9.0.0"
mp4 = "0.12.0"
ord-bitcoincore-rpc = "0.16.5"
redb = "0.12.1"
redb = "0.13.0"
regex = "1.6.0"
rss = "2.0.1"
rust-embed = "6.4.0"
Expand Down
2 changes: 1 addition & 1 deletion src/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ impl Index {
}

fn inscriptions_on_output<'a: 'tx, 'tx>(
satpoint_to_id: &'a impl ReadableTable<&'tx SatPointValue, &'tx InscriptionIdValue>,
satpoint_to_id: &'a impl ReadableTable<&'static SatPointValue, &'static InscriptionIdValue>,
outpoint: OutPoint,
) -> Result<impl Iterator<Item = (SatPoint, InscriptionId)> + 'tx> {
let start = SatPoint {
Expand Down
24 changes: 12 additions & 12 deletions src/index/updater/inscription_updater.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,31 @@ enum Origin {
pub(super) struct InscriptionUpdater<'a, 'db, 'tx> {
flotsam: Vec<Flotsam>,
height: u64,
id_to_satpoint: &'a mut Table<'db, 'tx, &'tx InscriptionIdValue, &'tx SatPointValue>,
id_to_satpoint: &'a mut Table<'db, 'tx, &'static InscriptionIdValue, &'static SatPointValue>,
index: &'a Index,
id_to_entry: &'a mut Table<'db, 'tx, &'tx InscriptionIdValue, InscriptionEntryValue>,
id_to_entry: &'a mut Table<'db, 'tx, &'static InscriptionIdValue, InscriptionEntryValue>,
lost_sats: u64,
next_number: u64,
number_to_id: &'a mut Table<'db, 'tx, u64, &'tx InscriptionIdValue>,
outpoint_to_value: &'a mut Table<'db, 'tx, &'tx OutPointValue, u64>,
number_to_id: &'a mut Table<'db, 'tx, u64, &'static InscriptionIdValue>,
outpoint_to_value: &'a mut Table<'db, 'tx, &'static OutPointValue, u64>,
reward: u64,
sat_to_inscription_id: &'a mut Table<'db, 'tx, u64, &'tx InscriptionIdValue>,
satpoint_to_id: &'a mut Table<'db, 'tx, &'tx SatPointValue, &'tx InscriptionIdValue>,
sat_to_inscription_id: &'a mut Table<'db, 'tx, u64, &'static InscriptionIdValue>,
satpoint_to_id: &'a mut Table<'db, 'tx, &'static SatPointValue, &'static InscriptionIdValue>,
timestamp: u32,
value_cache: &'a mut HashMap<OutPoint, u64>,
}

impl<'a, 'db, 'tx> InscriptionUpdater<'a, 'db, 'tx> {
pub(super) fn new(
height: u64,
id_to_satpoint: &'a mut Table<'db, 'tx, &'tx InscriptionIdValue, &'tx SatPointValue>,
id_to_satpoint: &'a mut Table<'db, 'tx, &'static InscriptionIdValue, &'static SatPointValue>,
index: &'a Index,
id_to_entry: &'a mut Table<'db, 'tx, &'tx InscriptionIdValue, InscriptionEntryValue>,
id_to_entry: &'a mut Table<'db, 'tx, &'static InscriptionIdValue, InscriptionEntryValue>,
lost_sats: u64,
number_to_id: &'a mut Table<'db, 'tx, u64, &'tx InscriptionIdValue>,
outpoint_to_value: &'a mut Table<'db, 'tx, &'tx OutPointValue, u64>,
sat_to_inscription_id: &'a mut Table<'db, 'tx, u64, &'tx InscriptionIdValue>,
satpoint_to_id: &'a mut Table<'db, 'tx, &'tx SatPointValue, &'tx InscriptionIdValue>,
number_to_id: &'a mut Table<'db, 'tx, u64, &'static InscriptionIdValue>,
outpoint_to_value: &'a mut Table<'db, 'tx, &'static OutPointValue, u64>,
sat_to_inscription_id: &'a mut Table<'db, 'tx, u64, &'static InscriptionIdValue>,
satpoint_to_id: &'a mut Table<'db, 'tx, &'static SatPointValue, &'static InscriptionIdValue>,
timestamp: u32,
value_cache: &'a mut HashMap<OutPoint, u64>,
) -> Result<Self> {
Expand Down

0 comments on commit 358073a

Please sign in to comment.