diff options
author | Mission Liao <mission.liao@dexon.org> | 2018-11-15 13:05:50 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-15 13:05:50 +0800 |
commit | ce9da6912a16f064160781bbff8a9762e305bae9 (patch) | |
tree | f4de88f0488687e4480cc8461b8a3cbf03a1c85b /integration_test | |
parent | 7b68cc8fa60d91a7c6ed2f78dc851da48d1fc258 (diff) | |
download | dexon-consensus-ce9da6912a16f064160781bbff8a9762e305bae9.tar.gz dexon-consensus-ce9da6912a16f064160781bbff8a9762e305bae9.tar.zst dexon-consensus-ce9da6912a16f064160781bbff8a9762e305bae9.zip |
test: fix network (#328)
* Broadcast to set of node instead of broadcasting when attaching cache.
* Fix pull blocks
Diffstat (limited to 'integration_test')
-rw-r--r-- | integration_test/consensus_test.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/integration_test/consensus_test.go b/integration_test/consensus_test.go index 356efb1..6bc6c4b 100644 --- a/integration_test/consensus_test.go +++ b/integration_test/consensus_test.go @@ -28,6 +28,7 @@ import ( "github.com/dexon-foundation/dexon-consensus/core/crypto" "github.com/dexon-foundation/dexon-consensus/core/test" "github.com/dexon-foundation/dexon-consensus/core/types" + "github.com/dexon-foundation/dexon-consensus/core/utils" "github.com/stretchr/testify/suite" ) @@ -69,6 +70,8 @@ func (s *ConsensusTestSuite) setupNodes( test.NetworkConfig{Type: test.NetworkTypeFake}) gov := seedGov.Clone() gov.SwitchToRemoteMode(networkModule) + gov.NotifyRoundHeight(0, 0) + networkModule.AddNodeSetCache(utils.NewNodeSetCache(gov)) app := test.NewApp(gov.State()) // Now is the consensus module. con := core.NewConsensus( @@ -114,7 +117,6 @@ func (s *ConsensusTestSuite) TestSimple() { req.NoError(err) req.NoError(seedGov.State().RequestChange( test.StateChangeRoundInterval, 25*time.Second)) - seedGov.NotifyRoundHeight(0, 0) // A short round interval. nodes := s.setupNodes(dMoment, prvKeys, seedGov) for _, n := range nodes { |