aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/dexon-foundation/dexon-consensus-core/core/types/config.go
diff options
context:
space:
mode:
authorWei-Ning Huang <w@dexon.org>2018-10-29 09:31:36 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-12 17:27:17 +0800
commita69fb3e4c59fab52b6e10993c67400084879b1a8 (patch)
tree8e849faadee1e1c43068a4b0392a02050d271e3e /vendor/github.com/dexon-foundation/dexon-consensus-core/core/types/config.go
parent3f320c9048198d14bc44413861efcbc5665324b1 (diff)
downloadgo-tangerine-a69fb3e4c59fab52b6e10993c67400084879b1a8.tar.gz
go-tangerine-a69fb3e4c59fab52b6e10993c67400084879b1a8.tar.zst
go-tangerine-a69fb3e4c59fab52b6e10993c67400084879b1a8.zip
vendor: sync consensus core and fix conflict
Diffstat (limited to 'vendor/github.com/dexon-foundation/dexon-consensus-core/core/types/config.go')
-rw-r--r--vendor/github.com/dexon-foundation/dexon-consensus-core/core/types/config.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/vendor/github.com/dexon-foundation/dexon-consensus-core/core/types/config.go b/vendor/github.com/dexon-foundation/dexon-consensus-core/core/types/config.go
index 372ffb4da..df28b2055 100644
--- a/vendor/github.com/dexon-foundation/dexon-consensus-core/core/types/config.go
+++ b/vendor/github.com/dexon-foundation/dexon-consensus-core/core/types/config.go
@@ -46,6 +46,22 @@ type Config struct {
MaxBlockInterval time.Duration
}
+// Clone return a copied configuration.
+func (c *Config) Clone() *Config {
+ return &Config{
+ NumChains: c.NumChains,
+ LambdaBA: c.LambdaBA,
+ LambdaDKG: c.LambdaDKG,
+ K: c.K,
+ PhiRatio: c.PhiRatio,
+ NotarySetSize: c.NotarySetSize,
+ DKGSetSize: c.DKGSetSize,
+ RoundInterval: c.RoundInterval,
+ MinBlockInterval: c.MinBlockInterval,
+ MaxBlockInterval: c.MaxBlockInterval,
+ }
+}
+
// Bytes returns []byte representation of Config.
func (c *Config) Bytes() []byte {
binaryNumChains := make([]byte, 4)