pub fn simulate_restore_op(
    snapshot_source: &impl SnapshotSourceWithArchive,
    network_config: &NetworkConfig,
    adjustment_config: &SimulationAdjustmentConfig,
    ledger_info: &LedgerInfo,
    keys_to_restore: &[LedgerKey],
) -> Result<RestoreOpSimulationResult>
Expand description

Simulates RestoreFootprintTtlOp operation specified via its relevant payload parts.

The operation is defined by the specified keys_to_restore. The keys will be restored with TTL set to ledger_info.sequence_number + ledger_info.min_persistent_entry_ttl - 1. Live entries will be ignored and excluded from the simulation results.

The rest of parameters define the ledger state (snapshot_source, network_config, ledger_info) and simulation adjustment configuration (adjustment_config). Note, that the snapshot_source has to be able to provide the access to the archived entries.

This will return error if a key can’t be restored due to either having incorrect type/durability (e.g. a temp entry), if a key is missing from snapshot_source, or in case of ledger mis-configuration.