diff options
author | Wei-Ning Huang <w@dexon.org> | 2018-10-19 18:52:38 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-12 17:23:39 +0800 |
commit | 0e12c9284efdf72a376f75f180bac7968d6fb382 (patch) | |
tree | 1b06f8f9483bff246dbeba12c7445780a595b21a /dex/governance.go | |
parent | 93563f41410b964454f23229cfabe1ec1ba735f5 (diff) | |
download | go-tangerine-0e12c9284efdf72a376f75f180bac7968d6fb382.tar.gz go-tangerine-0e12c9284efdf72a376f75f180bac7968d6fb382.tar.zst go-tangerine-0e12c9284efdf72a376f75f180bac7968d6fb382.zip |
consensus: dexcon: fetch config from state
Diffstat (limited to 'dex/governance.go')
-rw-r--r-- | dex/governance.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/dex/governance.go b/dex/governance.go index 4ec69c2d6..50ab7ee14 100644 --- a/dex/governance.go +++ b/dex/governance.go @@ -79,7 +79,13 @@ func (d *DexconGovernance) getGovStateAtRound(round uint64) *vm.GovernanceStateH return &vm.GovernanceStateHelper{state} } -// Configuration return the total ordering K constant. +// DexconConfiguration return raw config in state. +func (d *DexconGovernance) DexconConfiguration(round uint64) *params.DexconConfig { + s := d.getGovStateAtRound(round) + return s.Configuration() +} + +// Configuration returns the system configuration for consensus core to use. func (d *DexconGovernance) Configuration(round uint64) *coreTypes.Config { s := d.getGovStateAtRound(round) c := s.Configuration() |