diff options
author | Mission Liao <mission.liao@dexon.org> | 2018-09-28 12:32:50 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-28 12:32:50 +0800 |
commit | 5fc0efa940c7663a33d0fc501807a2627d2cb573 (patch) | |
tree | 932ef05c2d091bdbe6bc38f0391d45993cc1f42c /core/crypto | |
parent | 189a17a6586cd30ac355bd1165c44da6a2a08569 (diff) | |
download | dexon-consensus-5fc0efa940c7663a33d0fc501807a2627d2cb573.tar dexon-consensus-5fc0efa940c7663a33d0fc501807a2627d2cb573.tar.gz dexon-consensus-5fc0efa940c7663a33d0fc501807a2627d2cb573.tar.bz2 dexon-consensus-5fc0efa940c7663a33d0fc501807a2627d2cb573.tar.lz dexon-consensus-5fc0efa940c7663a33d0fc501807a2627d2cb573.tar.xz dexon-consensus-5fc0efa940c7663a33d0fc501807a2627d2cb573.tar.zst dexon-consensus-5fc0efa940c7663a33d0fc501807a2627d2cb573.zip |
core: hide types.NodeID from full node. (#147)
* Refine core.Governance interface
- Remove types.NodeID from interface declaration.
- All parameter should be round based.
* Add core.NodeSetCache
* Agreement accepts map of nodeID directly.
* test.Transport.Peers method return public keys.
Diffstat (limited to 'core/crypto')
-rw-r--r-- | core/crypto/ecdsa/ecdsa.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/crypto/ecdsa/ecdsa.go b/core/crypto/ecdsa/ecdsa.go index 5f98395..0196c47 100644 --- a/core/crypto/ecdsa/ecdsa.go +++ b/core/crypto/ecdsa/ecdsa.go @@ -64,6 +64,12 @@ func newPublicKey(prvKey *ecdsa.PrivateKey) *publicKey { } } +// NewPublicKeyFromByteSlice constructs an eth.publicKey instance from +// a byte slice. +func NewPublicKeyFromByteSlice(b []byte) crypto.PublicKey { + return publicKey{publicKey: b} +} + // decompressPubkey parses a public key in the 33-byte compressed format. func decompressPubkey(pubkey []byte) (publicKey, error) { _, err := ethcrypto.DecompressPubkey(pubkey) |