Add dev demo seed for busy HUD previews
tessera-demo crate, seed-demo CLI, TESSERA_SEED_DEMO hub hook, 12 orbits and 30 historical snapshots.
This commit is contained in:
@@ -117,11 +117,22 @@ impl Vault {
|
||||
manifest: SnapshotManifest,
|
||||
payload: &[u8],
|
||||
dry_run: bool,
|
||||
) -> Result<StoredSnapshot> {
|
||||
self.snapshot_at(manifest, payload, dry_run, Utc::now())
|
||||
}
|
||||
|
||||
/// Like `snapshot`, but allows a custom timestamp (demo/historical imports).
|
||||
pub fn snapshot_at(
|
||||
&mut self,
|
||||
manifest: SnapshotManifest,
|
||||
payload: &[u8],
|
||||
dry_run: bool,
|
||||
taken_at: DateTime<Utc>,
|
||||
) -> Result<StoredSnapshot> {
|
||||
if dry_run {
|
||||
return Ok(StoredSnapshot {
|
||||
id: manifest.snapshot_id,
|
||||
taken_at: Utc::now(),
|
||||
taken_at,
|
||||
manifest,
|
||||
size_bytes: payload.len() as u64,
|
||||
tree_root: "dry-run".into(),
|
||||
@@ -133,7 +144,7 @@ impl Vault {
|
||||
|
||||
let snap = StoredSnapshot {
|
||||
id: manifest.snapshot_id,
|
||||
taken_at: Utc::now(),
|
||||
taken_at,
|
||||
manifest,
|
||||
size_bytes: payload.len() as u64,
|
||||
tree_root: chunk_id,
|
||||
|
||||
Reference in New Issue
Block a user