diff options
author | Mission Liao <mission.liao@dexon.org> | 2018-11-08 15:58:51 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-08 15:58:51 +0800 |
commit | 1ee5863fd4a295d34c3a2d602d5603e8746e3f7b (patch) | |
tree | 044308b22000bb0c9f5a8c3c21f465159418db24 /core/test/state_test.go | |
parent | dbe83ea4a324941417d6ff09230e5874d5ba5df5 (diff) | |
download | dexon-consensus-1ee5863fd4a295d34c3a2d602d5603e8746e3f7b.tar dexon-consensus-1ee5863fd4a295d34c3a2d602d5603e8746e3f7b.tar.gz dexon-consensus-1ee5863fd4a295d34c3a2d602d5603e8746e3f7b.tar.bz2 dexon-consensus-1ee5863fd4a295d34c3a2d602d5603e8746e3f7b.tar.lz dexon-consensus-1ee5863fd4a295d34c3a2d602d5603e8746e3f7b.tar.xz dexon-consensus-1ee5863fd4a295d34c3a2d602d5603e8746e3f7b.tar.zst dexon-consensus-1ee5863fd4a295d34c3a2d602d5603e8746e3f7b.zip |
simulation: use test.Governacne in simulation (#311)
* Move simulation.Network to test package
* Use test.Governance in simulation
* Pack/Apply state request in blocks payload
* Add Governance.SwitchToRemoteMode
This would trigger governance to broadcast
pending state change requests when changes.
* Allow to marshal/unmarshal packedStateChanges
* Attach test.Network and test.State
Diffstat (limited to 'core/test/state_test.go')
-rw-r--r-- | core/test/state_test.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/test/state_test.go b/core/test/state_test.go index 6c5f882..864b5be 100644 --- a/core/test/state_test.go +++ b/core/test/state_test.go @@ -315,6 +315,9 @@ func (s *StateTestSuite) TestPacking() { req.Empty(st.DKGMasterPublicKeys(2)) req.Empty(st.DKGComplaints(2)) req.False(st.IsDKGFinal(2, 0)) + // In remote mode, we need to manually convert own requests to global ones. + _, err = st.PackOwnRequests() + req.NoError(err) // Pack changes into bytes. b, err := st.PackRequests() req.NoError(err) |