fn trace_crypto_values(tracer: &mut Tracer, samples: &mut Samples) -> Result<()> {
    let mut hasher = TestOnlyHasher::default();
    hasher.update(b"Test message");
    let hashed_message = hasher.finish();

    let mut rng: StdRng = SeedableRng::from_seed([0; 32]);
    let private_key = Ed25519PrivateKey::generate(&mut rng);
    let public_key: Ed25519PublicKey = (&private_key).into();
    let signature = private_key.sign_message(&hashed_message);

    tracer.trace_value(samples, &public_key)?;
    tracer.trace_value(samples, &signature)?;
    Ok(())
}
/// Record sample values for crypto types used by consensus.
Record sample values for crypto types used by consensus.
Record sample values for crypto types used by consensus .
fn trace_crypto_values(tracer: &mut Tracer, samples: &mut Samples) -> Result<()> {
    let mut hasher = TestOnlyHasher::default();
    hasher.update(b"Test message");
    let hashed_message = hasher.finish();
    let mut rng: StdRng = SeedableRng::from_seed([0; 32]);
    let private_key = Ed25519PrivateKey::generate(&mut rng);
    let public_key: Ed25519PublicKey = (&private_key).into();
    let signature = private_key.sign_message(&hashed_message);
    tracer.trace_value(samples, &public_key)?;
    tracer.trace_value(samples, &signature)?;
    Ok(())
}
fn trace_crypto_values ( tracer : & mut Tracer , samples : & mut Samples ) -> Result < ( ) > { let mut hasher = TestOnlyHasher :: default ( ) ; hasher . update ( b" " ) ; let hashed_message = hasher . finish ( ) ; let mut rng : StdRng = SeedableRng :: from_seed ( [ 0 ; 32 ] ) ; let private_key = Ed25519PrivateKey :: generate ( & mut rng ) ; let public_key : Ed25519PublicKey = ( & private_key ) . into ( ) ; let signature = private_key . sign_message ( & hashed_message ) ; tracer . trace_value ( samples , & public_key ) ? ; tracer . trace_value ( samples , & signature ) ? ; Ok ( ( ) ) }
Record sample values for crypto types used by consensus.
Record sample values for crypto types used by consensus .
tracer
&mut Tracer
samples
&mut Samples
tracer
&mut Tracer
samples
&mut Samples