From d71d4b09581ee9e557238e2bc30e8c5a06d952a5 Mon Sep 17 00:00:00 2001 From: Rongjian Lan Date: Thu, 10 Jan 2019 22:46:00 -0800 Subject: [PATCH] Fix txgen protocol not support problem --- cmd/client/txgen/main.go | 7 +++---- test/configs/local_config1.txt | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/cmd/client/txgen/main.go b/cmd/client/txgen/main.go index 9514c502c..c158eb898 100644 --- a/cmd/client/txgen/main.go +++ b/cmd/client/txgen/main.go @@ -95,17 +95,16 @@ func main() { // Nodes containing blockchain data to mirror the shards' data in the network nodes := []*node.Node{} + _, pubKey = utils.GenKey(clientPeer.IP, clientPeer.Port) + clientPeer.PubKey = pubKey + host := p2pimpl.NewHost(*clientPeer) for shardID := range shardIDLeaderMap { - _, pubKey := utils.GenKey(clientPeer.IP, clientPeer.Port) - clientPeer.PubKey = pubKey - host := p2pimpl.NewHost(*clientPeer) node := node.New(host, &consensus.Consensus{ShardID: shardID}, nil) // Assign many fake addresses so we have enough address to play with at first nodes = append(nodes, node) } // Client/txgenerator server node setup - host := p2pimpl.NewHost(*clientPeer) consensusObj := consensus.New(host, "0", nil, p2p.Peer{}) clientNode := node.New(host, consensusObj, nil) clientNode.Client = client.NewClient(clientNode.GetHost(), &shardIDLeaderMap) diff --git a/test/configs/local_config1.txt b/test/configs/local_config1.txt index 2e8297ff4..a6b607074 100644 --- a/test/configs/local_config1.txt +++ b/test/configs/local_config1.txt @@ -9,4 +9,4 @@ 127.0.0.1 9008 validator 0 127.0.0.1 9009 validator 0 127.0.0.1 9010 validator 0 -127.0.0.1 19999 client 0 +127.0.0.1 9999 client 0