aboutsummaryrefslogtreecommitdiffstats
path: root/consensus/dexcon/dexcon_test.go
diff options
context:
space:
mode:
authorWei-Ning Huang <w@dexon.org>2019-02-25 19:35:06 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-12 17:27:22 +0800
commitbfac6dd5391b871d148713014f2694d31d9b6ea4 (patch)
treeb80909c9f5ad6f6021b3ebacff51c73469401765 /consensus/dexcon/dexcon_test.go
parent2b2396b6bce0f21b515ac2d38556f6dca08b1770 (diff)
downloadgo-tangerine-bfac6dd5391b871d148713014f2694d31d9b6ea4.tar
go-tangerine-bfac6dd5391b871d148713014f2694d31d9b6ea4.tar.gz
go-tangerine-bfac6dd5391b871d148713014f2694d31d9b6ea4.tar.bz2
go-tangerine-bfac6dd5391b871d148713014f2694d31d9b6ea4.tar.lz
go-tangerine-bfac6dd5391b871d148713014f2694d31d9b6ea4.tar.xz
go-tangerine-bfac6dd5391b871d148713014f2694d31d9b6ea4.tar.zst
go-tangerine-bfac6dd5391b871d148713014f2694d31d9b6ea4.zip
core: vm: flatten governance
Diffstat (limited to 'consensus/dexcon/dexcon_test.go')
-rw-r--r--consensus/dexcon/dexcon_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/consensus/dexcon/dexcon_test.go b/consensus/dexcon/dexcon_test.go
index 65ed77cc8..f34823570 100644
--- a/consensus/dexcon/dexcon_test.go
+++ b/consensus/dexcon/dexcon_test.go
@@ -35,8 +35,8 @@ type GovStateFetcher struct {
statedb *state.StateDB
}
-func (g *GovStateFetcher) GetGovStateHelperAtRound(_ uint64) *vm.GovernanceStateHelper {
- return &vm.GovernanceStateHelper{g.statedb}
+func (g *GovStateFetcher) GetStateForConfigAtRound(_ uint64) *vm.GovernanceState {
+ return &vm.GovernanceState{g.statedb}
}
type DexconTestSuite struct {
@@ -45,7 +45,7 @@ type DexconTestSuite struct {
config *params.DexconConfig
memDB *ethdb.MemDatabase
stateDB *state.StateDB
- s *vm.GovernanceStateHelper
+ s *vm.GovernanceState
}
func (d *DexconTestSuite) SetupTest() {
@@ -56,7 +56,7 @@ func (d *DexconTestSuite) SetupTest() {
}
d.memDB = memDB
d.stateDB = stateDB
- d.s = &vm.GovernanceStateHelper{stateDB}
+ d.s = &vm.GovernanceState{stateDB}
config := params.TestnetChainConfig.Dexcon
config.LockupPeriod = 1000
@@ -73,7 +73,7 @@ func (d *DexconTestSuite) SetupTest() {
// Genesis CRS.
crs := crypto.Keccak256Hash([]byte(config.GenesisCRSText))
- d.s.PushCRS(crs)
+ d.s.SetCRS(crs)
// Round 0 height.
d.s.PushRoundHeight(big.NewInt(0))