Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

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

6 changes: 6 additions & 0 deletions crates/iota-config/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,12 @@ pub struct NodeConfig {
#[serde(default)]
pub state_snapshot_write_config: StateSnapshotConfig,

/// Read-side formal-snapshot source. When set, a running fullnode
/// background-backfills its gRPC `epochs_v2` table from the snapshot's
/// `EPOCH_INFO`. Disabled when `None` (the default).
#[serde(default, skip_serializing_if = "Option::is_none")]
pub state_snapshot_read_config: Option<ObjectStoreConfig>,

#[serde(default)]
pub indexer_max_subscriptions: Option<usize>,

Expand Down
12 changes: 11 additions & 1 deletion crates/iota-core/src/checkpoints/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -802,14 +802,24 @@ impl CheckpointStore {
&self,
epoch_id: EpochId,
) -> IotaResult<Option<VerifiedCheckpoint>> {
let seq = self.tables.epoch_last_checkpoint_map.get(&epoch_id)?;
let seq = self.get_epoch_last_checkpoint_seq_number(epoch_id)?;
let checkpoint = match seq {
Some(seq) => self.get_checkpoint_by_sequence_number(seq)?,
None => None,
};
Ok(checkpoint)
}

/// Sequence number of `epoch_id`'s last checkpoint. Unlike
/// [`Self::get_epoch_last_checkpoint`], this does not require the summary
/// itself to still be present: the underlying map is never pruned.
pub fn get_epoch_last_checkpoint_seq_number(
&self,
epoch_id: EpochId,
) -> Result<Option<CheckpointSequenceNumber>, TypedStoreError> {
self.tables.epoch_last_checkpoint_map.get(&epoch_id)
}

pub fn insert_epoch_last_checkpoint(
&self,
epoch_id: EpochId,
Expand Down
Loading
Loading