MCPcopy Create free account
hub / github.com/ddimaria/rust-blockchain-tutorial / get_public_key

Function get_public_key

chain/src/keys.rs:40–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38}
39
40pub(crate) fn get_public_key() -> Result<PublicKey> {
41 let key = read(PUBLIC_KEY_PATH).expect("Could not read public key");
42 PublicKey::from_slice(&key).map_err(|e| ChainError::InternalError(e.to_string()))
43}
44
45#[cfg(test)]
46mod tests {

Callers 1

Calls

no outgoing calls

Tested by 1