diff options
author | Wei-Ning Huang <w@dexon.org> | 2018-11-19 14:36:36 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-12 17:27:18 +0800 |
commit | 78dac82d810fe4a1ad6878adbc789f909155f472 (patch) | |
tree | 13189c293ed8603a7e9d8b15571fff1737c9bc1f /params | |
parent | 8a0b917def2d80b112d7d8a5854aba62afc0a630 (diff) | |
download | go-tangerine-78dac82d810fe4a1ad6878adbc789f909155f472.tar go-tangerine-78dac82d810fe4a1ad6878adbc789f909155f472.tar.gz go-tangerine-78dac82d810fe4a1ad6878adbc789f909155f472.tar.bz2 go-tangerine-78dac82d810fe4a1ad6878adbc789f909155f472.tar.lz go-tangerine-78dac82d810fe4a1ad6878adbc789f909155f472.tar.xz go-tangerine-78dac82d810fe4a1ad6878adbc789f909155f472.tar.zst go-tangerine-78dac82d810fe4a1ad6878adbc789f909155f472.zip |
governance: implement delegate/undelegate function and add tests (#33)
Implement delegate/undelegate function to allow others to delegate it's
fund to stake on a node. Also added governance contract tests.
Diffstat (limited to 'params')
-rw-r--r-- | params/config.go | 6 | ||||
-rw-r--r-- | params/gen_dexcon_config.go | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/params/config.go b/params/config.go index 4dbbf6233..871954b59 100644 --- a/params/config.go +++ b/params/config.go @@ -61,7 +61,7 @@ var ( LambdaBA: 250, LambdaDKG: 2500, K: 0, - PhiRatio: 667000, + PhiRatio: 0.667, NotarySetSize: 4, DKGSetSize: 4, RoundInterval: 600000, @@ -100,7 +100,7 @@ var ( LambdaBA: 250, LambdaDKG: 2500, K: 0, - PhiRatio: 667000, + PhiRatio: 0.667, NotarySetSize: 4, DKGSetSize: 4, RoundInterval: 600000, @@ -209,7 +209,7 @@ type DexconConfig struct { NumChains uint32 `json:"numChains"` LambdaBA uint64 `json:"lambdaBA"` LambdaDKG uint64 `json:"lambdaDKG"` - K int `json:"k"` + K uint32 `json:"k"` PhiRatio float32 `json:"phiRatio"` NotarySetSize uint32 `json:"notarySetSize"` DKGSetSize uint32 `json:"dkgSetSize"` diff --git a/params/gen_dexcon_config.go b/params/gen_dexcon_config.go index 6633b38f3..9cd9395cc 100644 --- a/params/gen_dexcon_config.go +++ b/params/gen_dexcon_config.go @@ -23,7 +23,7 @@ func (d DexconConfig) MarshalJSON() ([]byte, error) { NumChains uint32 `json:"numChains"` LambdaBA uint64 `json:"lambdaBA"` LambdaDKG uint64 `json:"lambdaDKG"` - K int `json:"k"` + K uint32 `json:"k"` PhiRatio float32 `json:"phiRatio"` NotarySetSize uint32 `json:"notarySetSize"` DKGSetSize uint32 `json:"dkgSetSize"` @@ -59,7 +59,7 @@ func (d *DexconConfig) UnmarshalJSON(input []byte) error { NumChains *uint32 `json:"numChains"` LambdaBA *uint64 `json:"lambdaBA"` LambdaDKG *uint64 `json:"lambdaDKG"` - K *int `json:"k"` + K *uint32 `json:"k"` PhiRatio *float32 `json:"phiRatio"` NotarySetSize *uint32 `json:"notarySetSize"` DKGSetSize *uint32 `json:"dkgSetSize"` |