diff options
author | Péter Szilágyi <peterke@gmail.com> | 2015-04-12 19:34:53 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2015-04-12 19:34:53 +0800 |
commit | 5467e7b312a29f492ce3063686711ea0bea6dbc3 (patch) | |
tree | a181f11e8cfd0f47befd8868c23ad65e10f84edf /whisper | |
parent | f8a4cd7ec17774ad841f85241855820424ccfd2d (diff) | |
download | go-tangerine-5467e7b312a29f492ce3063686711ea0bea6dbc3.tar.gz go-tangerine-5467e7b312a29f492ce3063686711ea0bea6dbc3.tar.zst go-tangerine-5467e7b312a29f492ce3063686711ea0bea6dbc3.zip |
whisper: fix comment entity capitalizations
Diffstat (limited to 'whisper')
-rw-r--r-- | whisper/envelope.go | 4 | ||||
-rw-r--r-- | whisper/message.go | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/whisper/envelope.go b/whisper/envelope.go index 6ad48dd25..f35a40a42 100644 --- a/whisper/envelope.go +++ b/whisper/envelope.go @@ -59,7 +59,7 @@ func (self *Envelope) Seal(pow time.Duration) { } } -// Valid checks whether the claimed proof of work was indeed executed. +// valid checks whether the claimed proof of work was indeed executed. // TODO: Is this really useful? Isn't this always true? func (self *Envelope) valid() bool { d := make([]byte, 64) @@ -69,7 +69,7 @@ func (self *Envelope) valid() bool { return common.FirstBitSet(common.BigD(crypto.Sha3(d))) > 0 } -// RlpWithoutNonce returns the RLP encoded envelope contents, except the nonce. +// rlpWithoutNonce returns the RLP encoded envelope contents, except the nonce. func (self *Envelope) rlpWithoutNonce() []byte { enc, _ := rlp.EncodeToBytes([]interface{}{self.Expiry, self.TTL, self.Topics, self.Data}) return enc diff --git a/whisper/message.go b/whisper/message.go index 255352ee8..2666ee6e0 100644 --- a/whisper/message.go +++ b/whisper/message.go @@ -48,7 +48,7 @@ func NewMessage(payload []byte) *Message { // Wrap bundles the message into an Envelope to transmit over the network. // -// Pov (Proof Of Work) controls how much time to spend on hashing the message, +// pow (Proof Of Work) controls how much time to spend on hashing the message, // inherently controlling its priority through the network (smaller hash, bigger // priority). // @@ -81,7 +81,7 @@ func (self *Message) Wrap(pow time.Duration, options Options) (*Envelope, error) return envelope, nil } -// Sign calculates and sets the cryptographic signature for the message , also +// sign calculates and sets the cryptographic signature for the message , also // setting the sign flag. func (self *Message) sign(key *ecdsa.PrivateKey) (err error) { self.Flags |= 1 << 7 @@ -101,18 +101,18 @@ func (self *Message) Recover() *ecdsa.PublicKey { return pub } -// Encrypt encrypts a message payload with a public key. +// encrypt encrypts a message payload with a public key. func (self *Message) encrypt(to *ecdsa.PublicKey) (err error) { self.Payload, err = crypto.Encrypt(to, self.Payload) return } -// Hash calculates the SHA3 checksum of the message flags and payload. +// hash calculates the SHA3 checksum of the message flags and payload. func (self *Message) hash() []byte { return crypto.Sha3(append([]byte{self.Flags}, self.Payload...)) } -// Bytes flattens the message contents (flags, signature and payload) into a +// bytes flattens the message contents (flags, signature and payload) into a // single binary blob. func (self *Message) bytes() []byte { return append([]byte{self.Flags}, append(self.Signature, self.Payload...)...) |