Commit 0b088ff7 authored by duanjinfei's avatar duanjinfei

add log print

parent acc06ccf
...@@ -3,6 +3,7 @@ package controllers ...@@ -3,6 +3,7 @@ package controllers
import ( import (
"crypto/ecdsa" "crypto/ecdsa"
"encoding/json" "encoding/json"
"fmt"
"github.com/astaxie/beego" "github.com/astaxie/beego"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/common/hexutil"
...@@ -38,7 +39,9 @@ func (c *LLMController) GetContainerSign() { ...@@ -38,7 +39,9 @@ func (c *LLMController) GetContainerSign() {
reqHash := crypto.Keccak256Hash([]byte(signData.TaskParam)) reqHash := crypto.Keccak256Hash([]byte(signData.TaskParam))
respHash := crypto.Keccak256Hash([]byte(signData.TaskResult)) respHash := crypto.Keccak256Hash([]byte(signData.TaskResult))
signHash := crypto.Keccak256Hash([]byte(signData.TaskId), reqHash.Bytes(), respHash.Bytes()) signHash := crypto.Keccak256Hash([]byte(signData.TaskId), reqHash.Bytes(), respHash.Bytes())
fmt.Println("signHash :", signHash)
signature, err := crypto.Sign(signHash.Bytes(), bridgePrv) signature, err := crypto.Sign(signHash.Bytes(), bridgePrv)
fmt.Println("signature :", signature)
if err != nil { if err != nil {
return return
} }
......
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