diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2018-08-13 14:02:23 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-13 14:02:23 +0800 |
commit | 39e2ea5eb982007a7438198f6d633fe580a3fd1f (patch) | |
tree | cd87fe44352df53d04ebfab71daf62ce57d46d28 /crypto/eth | |
parent | ef8eef3e341777adc00b87c2b226bffbe337ebf6 (diff) | |
download | dexon-consensus-39e2ea5eb982007a7438198f6d633fe580a3fd1f.tar dexon-consensus-39e2ea5eb982007a7438198f6d633fe580a3fd1f.tar.gz dexon-consensus-39e2ea5eb982007a7438198f6d633fe580a3fd1f.tar.bz2 dexon-consensus-39e2ea5eb982007a7438198f6d633fe580a3fd1f.tar.lz dexon-consensus-39e2ea5eb982007a7438198f6d633fe580a3fd1f.tar.xz dexon-consensus-39e2ea5eb982007a7438198f6d633fe580a3fd1f.tar.zst dexon-consensus-39e2ea5eb982007a7438198f6d633fe580a3fd1f.zip |
core: ValidatorID.Hash is the hash of public key. (#49)
Diffstat (limited to 'crypto/eth')
-rw-r--r-- | crypto/eth/eth.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto/eth/eth.go b/crypto/eth/eth.go index edf50d3..975d8a8 100644 --- a/crypto/eth/eth.go +++ b/crypto/eth/eth.go @@ -104,6 +104,11 @@ func (pub PublicKey) Compress() []byte { return pub.publicKey } +// Bytes returns the []byte representation of public key. +func (pub PublicKey) Bytes() []byte { + return pub.Compress() +} + // SigToPub returns the PublicKey that created the given signature. func SigToPub( hash common.Hash, signature crypto.Signature) (PublicKey, error) { |