|
|
@ -109,8 +109,7 @@ func NewFaker() *Consensus { |
|
|
|
return &Consensus{} |
|
|
|
return &Consensus{} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Sign on the hash of the message with the private keys and return the signature.
|
|
|
|
// Sign on the hash of the message
|
|
|
|
// If multiple keys are provided, the aggregated signature will be returned.
|
|
|
|
|
|
|
|
func (consensus *Consensus) signMessage(message []byte, priKey *bls_core.SecretKey) []byte { |
|
|
|
func (consensus *Consensus) signMessage(message []byte, priKey *bls_core.SecretKey) []byte { |
|
|
|
hash := hash.Keccak256(message) |
|
|
|
hash := hash.Keccak256(message) |
|
|
|
signature := priKey.SignHash(hash[:]) |
|
|
|
signature := priKey.SignHash(hash[:]) |
|
|
|