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

Method write

finalizer/src/db.rs:368–387  ·  view source on GitHub ↗
(&self, buf: &mut impl BufMut)

Source from the content-addressed store, hash-verified

366 Block::read_cfg(buf, &())?,
367 )))),
368 0x07 => Ok(Self::FinalizedHeader(Box::new(FinalizedHeader::<
369 bls12381_multisig::Scheme<PublicKey, V>,
370 >::read_cfg(
371 buf, &()
372 )?))),
373 byte => Err(Error::InvalidVarint(byte as usize)),
374 }
375 }
376}
377
378impl<V: Variant> Write for Value<V> {
379 fn write(&self, buf: &mut impl BufMut) {
380 match self {
381 Self::U64(val) => {
382 buf.put_u8(0x01);
383 buf.put_u64(*val);
384 }
385 Self::ConsensusState(state) => {
386 buf.put_u8(0x05);
387 state.write(buf);
388 }
389 Self::Checkpoint(checkpoint) => {
390 buf.put_u8(0x06);

Callers 1

parse_execution_requestsFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected