Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create savepoint if it has been SAVEPOINT_INTERVAL blocks since the… #2365

Merged
merged 9 commits into from
Dec 20, 2024
Prev Previous commit
Next Next commit
Amend
  • Loading branch information
raphjaph committed Dec 20, 2024
commit 2b94254fbf71efff0eeed8fc762f0447dffb8041
2 changes: 1 addition & 1 deletion src/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ pub(crate) enum Statistic {
Runes = 13,
SatRanges = 14,
UnboundInscriptions = 16,
LastSavePointHeight = 17,
LastSavepointHeight = 17,
}

impl Statistic {
Expand Down
4 changes: 2 additions & 2 deletions src/index/reorg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ impl Reorg {
.begin_read()?
.0
.open_table(STATISTIC_TO_COUNT)?
.get(&Statistic::LastSavePointHeight.key())?
.get(&Statistic::LastSavepointHeight.key())?
.map(|last_savepoint_height| last_savepoint_height.value())
.unwrap_or(0)
.try_into()
Expand Down Expand Up @@ -122,7 +122,7 @@ impl Reorg {

wtx
.open_table(STATISTIC_TO_COUNT)?
.insert(&Statistic::LastSavePointHeight.key(), &u64::from(height))?;
.insert(&Statistic::LastSavepointHeight.key(), &u64::from(height))?;

Index::increment_statistic(&wtx, Statistic::Commits, 1)?;
wtx.commit()?;
Expand Down
Loading