aboutsummaryrefslogtreecommitdiffstats
path: root/core/lattice_test.go
diff options
context:
space:
mode:
authorMission Liao <mission.liao@dexon.org>2018-11-01 14:53:31 +0800
committerGitHub <noreply@github.com>2018-11-01 14:53:31 +0800
commitebfa4a6164dab7db29859538c1aa0e9659bd951a (patch)
tree317ee8ee45194ec63b4475565bf91cc7862494db /core/lattice_test.go
parent56fe2ee9435a89a46c0f3d527580aac43c85dc65 (diff)
downloadtangerine-consensus-ebfa4a6164dab7db29859538c1aa0e9659bd951a.tar
tangerine-consensus-ebfa4a6164dab7db29859538c1aa0e9659bd951a.tar.gz
tangerine-consensus-ebfa4a6164dab7db29859538c1aa0e9659bd951a.tar.bz2
tangerine-consensus-ebfa4a6164dab7db29859538c1aa0e9659bd951a.tar.lz
tangerine-consensus-ebfa4a6164dab7db29859538c1aa0e9659bd951a.tar.xz
tangerine-consensus-ebfa4a6164dab7db29859538c1aa0e9659bd951a.tar.zst
tangerine-consensus-ebfa4a6164dab7db29859538c1aa0e9659bd951a.zip
core: core.Lattice supports config change (#276)
Besides making core.Lattice supports config change, This PR also include the first test for below scenario: - Configuration changes are registered before test running - Those changes are carried/broadcasted as payload of blocks - Only one node would initiate these changes, however, all nodes would finally receive/apply those changes to their own test.Governance instance.
Diffstat (limited to 'core/lattice_test.go')
-rw-r--r--core/lattice_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/lattice_test.go b/core/lattice_test.go
index ec40d05..bace8a2 100644
--- a/core/lattice_test.go
+++ b/core/lattice_test.go
@@ -101,13 +101,13 @@ func (s *LatticeTestSuite) newTestLatticeMgr(
// Setup blockdb.
db, err := blockdb.NewMemBackedBlockDB()
req.NoError(err)
- // Setup application.
- app := test.NewApp()
// Setup governance.
_, pubKeys, err := test.NewKeys(int(cfg.NotarySetSize))
req.NoError(err)
gov, err := test.NewGovernance(pubKeys, cfg.LambdaBA)
req.NoError(err)
+ // Setup application.
+ app := test.NewApp(gov.State())
// Setup compaction chain.
cc := newCompactionChain(gov)
cc.init(&types.Block{})