From fc448ba47c508943e5144ca4bb11cb1422ed8ba3 Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Mon, 21 Jan 2019 12:59:53 -0500 Subject: [PATCH] key: Reword and clarify comments --- src/util/key.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/key.rs b/src/util/key.rs index acf175c2..282a3a05 100644 --- a/src/util/key.rs +++ b/src/util/key.rs @@ -27,7 +27,7 @@ use util::base58; /// A Bitcoin ECDSA public key #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct PublicKey { - /// Whether this public key represents a compressed address + /// Whether this public key should be serialized as compressed pub compressed: bool, /// The actual ECDSA key pub key: secp256k1::PublicKey, @@ -70,7 +70,7 @@ impl PublicKey { #[derive(Clone, PartialEq, Eq)] /// A Bitcoin ECDSA private key pub struct PrivateKey { - /// Whether this private key represents a compressed address + /// Whether this private key should be serialized as compressed pub compressed: bool, /// The network on which this key should be used pub network: Network, @@ -79,7 +79,7 @@ pub struct PrivateKey { } impl PrivateKey { - /// Computes the public key as supposed to be used with this secret + /// Creates a public key from this private key pub fn public_key(&self, secp: &Secp256k1) -> PublicKey { PublicKey { compressed: self.compressed,