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/test/interface.go | |
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/test/interface.go')
-rw-r--r-- | core/test/interface.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/test/interface.go b/core/test/interface.go index a422ee7..ad8304e 100644 --- a/core/test/interface.go +++ b/core/test/interface.go @@ -19,6 +19,7 @@ package test import ( "github.com/dexon-foundation/dexon-consensus-core/core/blockdb" + "github.com/dexon-foundation/dexon-consensus-core/core/crypto" "github.com/dexon-foundation/dexon-consensus-core/core/types" ) @@ -96,10 +97,10 @@ type Transport interface { // Close would cleanup allocated resources. Close() error - // Peers return IDs of all connected nodes in p2p favor. + // Peers return public keys of all connected nodes in p2p favor. // This method should be accessed after ether 'Join' or 'WaitForPeers' // returned. - Peers() map[types.NodeID]struct{} + Peers() []crypto.PublicKey } // Marshaller defines an interface to convert between interface{} and []byte. |