diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2018-09-26 09:55:08 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-26 09:55:08 +0800 |
commit | a79c10ff1f4717e7e26096f81a57df10b8c9a592 (patch) | |
tree | 69081c65669f0a68e7f27a81efffbacfb1983f10 /core/crypto.go | |
parent | 0ffea9dadcfc0d8a740942a2d666eccc00613cd4 (diff) | |
download | dexon-consensus-a79c10ff1f4717e7e26096f81a57df10b8c9a592.tar dexon-consensus-a79c10ff1f4717e7e26096f81a57df10b8c9a592.tar.gz dexon-consensus-a79c10ff1f4717e7e26096f81a57df10b8c9a592.tar.bz2 dexon-consensus-a79c10ff1f4717e7e26096f81a57df10b8c9a592.tar.lz dexon-consensus-a79c10ff1f4717e7e26096f81a57df10b8c9a592.tar.xz dexon-consensus-a79c10ff1f4717e7e26096f81a57df10b8c9a592.tar.zst dexon-consensus-a79c10ff1f4717e7e26096f81a57df10b8c9a592.zip |
core: run TSIG for first configuration block at startup (#135)
Diffstat (limited to 'core/crypto.go')
-rw-r--r-- | core/crypto.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/crypto.go b/core/crypto.go index c95811e..26e44f9 100644 --- a/core/crypto.go +++ b/core/crypto.go @@ -225,9 +225,13 @@ func hashDKGPartialSignature(psig *types.DKGPartialSignature) common.Hash { binaryRound := make([]byte, 8) binary.LittleEndian.PutUint64(binaryRound, psig.Round) + binaryType := make([]byte, 4) + binary.LittleEndian.PutUint32(binaryType, uint32(psig.Type)) + return crypto.Keccak256Hash( psig.ProposerID.Hash[:], binaryRound, + binaryType, psig.PartialSignature[:], ) } |