aboutsummaryrefslogtreecommitdiffstats
path: root/integration_test/node.go
diff options
context:
space:
mode:
authorMission Liao <mission.liao@dexon.org>2018-09-28 12:32:50 +0800
committerGitHub <noreply@github.com>2018-09-28 12:32:50 +0800
commit5fc0efa940c7663a33d0fc501807a2627d2cb573 (patch)
tree932ef05c2d091bdbe6bc38f0391d45993cc1f42c /integration_test/node.go
parent189a17a6586cd30ac355bd1165c44da6a2a08569 (diff)
downloadtangerine-consensus-5fc0efa940c7663a33d0fc501807a2627d2cb573.tar
tangerine-consensus-5fc0efa940c7663a33d0fc501807a2627d2cb573.tar.gz
tangerine-consensus-5fc0efa940c7663a33d0fc501807a2627d2cb573.tar.bz2
tangerine-consensus-5fc0efa940c7663a33d0fc501807a2627d2cb573.tar.lz
tangerine-consensus-5fc0efa940c7663a33d0fc501807a2627d2cb573.tar.xz
tangerine-consensus-5fc0efa940c7663a33d0fc501807a2627d2cb573.tar.zst
tangerine-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 'integration_test/node.go')
-rw-r--r--integration_test/node.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/integration_test/node.go b/integration_test/node.go
index d66a86a..ee25b11 100644
--- a/integration_test/node.go
+++ b/integration_test/node.go
@@ -88,9 +88,13 @@ func NewNode(
shardID = uint32(0)
chainID = uint32(math.MaxUint32)
governanceConfig = gov.GetConfiguration(0)
- broadcastTargets = gov.GetNodeSet(0)
+ nodeSetKeys = gov.GetNodeSet(0)
nodeID = types.NewNodeID(privateKey.PublicKey())
)
+ broadcastTargets := make(map[types.NodeID]struct{})
+ for _, k := range nodeSetKeys {
+ broadcastTargets[types.NewNodeID(k)] = struct{}{}
+ }
hashes := common.Hashes{}
for nID := range broadcastTargets {
hashes = append(hashes, nID.Hash)