diff options
author | Wei-Ning Huang <w@dexon.org> | 2018-09-18 17:57:36 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-18 17:57:36 +0800 |
commit | 8c33027b943e08de21b7bddb82fecc2b2a5664a2 (patch) | |
tree | eaa282b1238eb609d710e9c45bb0689e7a399039 /integration_test | |
parent | 476c759f5e2ea3949cf3aaf4e60ccc7e0439ee73 (diff) | |
download | tangerine-consensus-8c33027b943e08de21b7bddb82fecc2b2a5664a2.tar.gz tangerine-consensus-8c33027b943e08de21b7bddb82fecc2b2a5664a2.tar.zst tangerine-consensus-8c33027b943e08de21b7bddb82fecc2b2a5664a2.zip |
core: refine governance interface to reduce Get* methods (#114)
Since we have a bunch of static configurations in the governance
contract, instead of using a Get* method for each of them, we instead
implement a GetConfiguration() method to return a structure of the configurations.
Diffstat (limited to 'integration_test')
-rw-r--r-- | integration_test/utils.go | 4 | ||||
-rw-r--r-- | integration_test/validator.go | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/integration_test/utils.go b/integration_test/utils.go index 57bb2bc..c526bc2 100644 --- a/integration_test/utils.go +++ b/integration_test/utils.go @@ -31,7 +31,7 @@ func PrepareValidators( if err != nil { return } - for vID := range gov.GetValidatorSet() { + for vID := range gov.GetNotarySet() { apps[vID] = test.NewApp() if db, err = blockdb.NewMemBackedBlockDB(); err != nil { @@ -39,7 +39,7 @@ func PrepareValidators( } dbs[vID] = db } - for vID := range gov.GetValidatorSet() { + for vID := range gov.GetNotarySet() { if key, err = gov.GetPrivateKey(vID); err != nil { return } diff --git a/integration_test/validator.go b/integration_test/validator.go index 18e5c00..112f986 100644 --- a/integration_test/validator.go +++ b/integration_test/validator.go @@ -83,7 +83,7 @@ func NewValidator( proposingLatency test.LatencyModel) *Validator { hashes := make(common.Hashes, 0) - for vID := range gov.GetValidatorSet() { + for vID := range gov.GetNotarySet() { hashes = append(hashes, vID.Hash) } sort.Sort(hashes) @@ -137,7 +137,7 @@ func (v *Validator) handleProposeBlock(when time.Time, piggyback interface{}) ( return } // Create 'block received' event for each other validators. - for vID := range v.gov.GetValidatorSet() { + for vID := range v.gov.GetNotarySet() { if vID == v.ID { continue } |