Commit d8de0242 authored by duanjinfei's avatar duanjinfei

add log print

parent 0b088ff7
......@@ -39,13 +39,15 @@ func (c *LLMController) GetContainerSign() {
reqHash := crypto.Keccak256Hash([]byte(signData.TaskParam))
respHash := crypto.Keccak256Hash([]byte(signData.TaskResult))
signHash := crypto.Keccak256Hash([]byte(signData.TaskId), reqHash.Bytes(), respHash.Bytes())
fmt.Println("signHash :", signHash)
fmt.Println("signHash :", signHash.String())
signature, err := crypto.Sign(signHash.Bytes(), bridgePrv)
fmt.Println("signature :", signature)
if err != nil {
return
}
signHex := common.Bytes2Hex(signature)
fmt.Println("signature :", signHex)
containerPubKey, err := crypto.SigToPub(signHash.Bytes(), signature)
fmt.Println("container address:", crypto.PubkeyToAddress(*containerPubKey).String())
c.ResponseInfo(200, "sign container successful", signHex)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment