diff options
| author | Wei-Ning Huang <w@dexon.org> | 2018-09-17 17:45:49 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-09-17 17:45:49 +0800 |
| commit | 8a908e98279d7e80978cd412057eddd4a6bbf06c (patch) | |
| tree | 4e28f76fd95814978210c6f38ec4a09988e76957 /simulation | |
| parent | cbf0012603deb6d2b8c257c079de98792f7b84cf (diff) | |
| download | dexon-consensus-8a908e98279d7e80978cd412057eddd4a6bbf06c.tar dexon-consensus-8a908e98279d7e80978cd412057eddd4a6bbf06c.tar.gz dexon-consensus-8a908e98279d7e80978cd412057eddd4a6bbf06c.tar.bz2 dexon-consensus-8a908e98279d7e80978cd412057eddd4a6bbf06c.tar.lz dexon-consensus-8a908e98279d7e80978cd412057eddd4a6bbf06c.tar.xz dexon-consensus-8a908e98279d7e80978cd412057eddd4a6bbf06c.tar.zst dexon-consensus-8a908e98279d7e80978cd412057eddd4a6bbf06c.zip | |
core: move blockdb into core package and minor change on governance interface (#110)
Since third party apps will possibly implement their only blockdb class,
it make sense for the interface to be in core.
Also add GetNumShards into the governance interface.
Diffstat (limited to 'simulation')
| -rw-r--r-- | simulation/governance.go | 9 | ||||
| -rw-r--r-- | simulation/validator.go | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/simulation/governance.go b/simulation/governance.go index 5220ae5..44f679d 100644 --- a/simulation/governance.go +++ b/simulation/governance.go @@ -85,8 +85,13 @@ func (g *simGovernance) GetBlockProposingInterval() int { return 0 } -// GetChainNumber returns number of chain. -func (g *simGovernance) GetChainNumber() uint32 { +// GetNumShards returns number of shards. +func (g *simGovernance) GetNumShards() uint32 { + return 1 +} + +// GetNumChains returns number of chains. +func (g *simGovernance) GetNumChains() uint32 { return g.chainNum } diff --git a/simulation/validator.go b/simulation/validator.go index 483912b..137c2c0 100644 --- a/simulation/validator.go +++ b/simulation/validator.go @@ -22,9 +22,9 @@ import ( "sort" "time" - "github.com/dexon-foundation/dexon-consensus-core/blockdb" "github.com/dexon-foundation/dexon-consensus-core/common" "github.com/dexon-foundation/dexon-consensus-core/core" + "github.com/dexon-foundation/dexon-consensus-core/core/blockdb" "github.com/dexon-foundation/dexon-consensus-core/core/types" "github.com/dexon-foundation/dexon-consensus-core/crypto" "github.com/dexon-foundation/dexon-consensus-core/simulation/config" |
