MCPcopy Create free account
hub / github.com/SeismicSystems/summit / put_block

Method put_block

syncer/src/cache.rs:261–270  ·  view source on GitHub ↗

Add a notarized block to the prunable archive.

(&mut self, round: Round, commitment: B::Digest, block: B)

Source from the content-addressed store, hash-verified

259 value_partition: format!("{}-cache-{epoch}-{name}-value", cfg.partition_prefix),
260 items_per_section: cfg.prunable_items_per_section,
261 compression: None,
262 codec_config,
263 replay_buffer: cfg.replay_buffer,
264 key_write_buffer: cfg.key_write_buffer,
265 value_write_buffer: cfg.value_write_buffer,
266 };
267 let archive = prunable::Archive::init(ctx.child(name), archive_cfg)
268 .await
269 .unwrap_or_else(|_| panic!("failed to initialize {name} archive"));
270 info!(elapsed = ?ctx.current().duration_since(start).unwrap_or(Duration::ZERO), "restored {name} archive");
271 archive
272 }
273

Callers 1

cache_blockMethod · 0.80

Calls 4

get_or_init_epochMethod · 0.80
epochMethod · 0.80
getMethod · 0.80
viewMethod · 0.80

Tested by

no test coverage detected