diff options
Diffstat (limited to 'core/types')
-rw-r--r-- | core/types/config.go | 5 | ||||
-rw-r--r-- | core/types/dkg.go | 11 |
2 files changed, 14 insertions, 2 deletions
diff --git a/core/types/config.go b/core/types/config.go index 1392ec5..4f5bd6e 100644 --- a/core/types/config.go +++ b/core/types/config.go @@ -26,8 +26,9 @@ type Config struct { NumChains uint32 GenesisCRS string - // Byzantine agreement related. - Lambda time.Duration + // Lambda related. + LambdaBA time.Duration + LambdaDKG time.Duration // Total ordering related. K int diff --git a/core/types/dkg.go b/core/types/dkg.go index d70bf98..ff0aa75 100644 --- a/core/types/dkg.go +++ b/core/types/dkg.go @@ -18,6 +18,8 @@ package types import ( + "fmt" + "github.com/dexon-foundation/dexon-consensus-core/crypto" "github.com/dexon-foundation/dexon-consensus-core/crypto/dkg" ) @@ -31,6 +33,15 @@ type DKGPrivateShare struct { Signature crypto.Signature `json:"signature"` } +func (p *DKGPrivateShare) String() string { + return fmt.Sprintf("prvShare(%d:%s->%s:%s:%s)", + p.Round, + p.ProposerID.String()[:6], + p.ReceiverID.String()[:6], + p.PrivateShare.String(), + p.Signature.String()[:6]) +} + // DKGMasterPublicKey decrtibe a master public key in DKG protocol. type DKGMasterPublicKey struct { ProposerID NodeID `json:"proposer_id"` |