Skip to content

Commit

Permalink
add more info log in recover process (#782)
Browse files Browse the repository at this point in the history
  • Loading branch information
huangzhiran authored Dec 16, 2024
1 parent 6c3cd98 commit 8837046
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions service/apinode/api/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,15 @@ func recover(req CreateTaskReq, cfg *project.Config, sig []byte) (res []*struct
value := gjson.GetBytes(req.Payload, k.Name)
switch k.Type {
case "uint64":
slog.Info("request json info", "json value uint64", value.Uint())
buf := new(bytes.Buffer)
if err := binary.Write(buf, binary.LittleEndian, value.Uint()); err != nil {
return nil, "", "", errors.New("failed to convert uint64 to bytes array")
}
d = append(d, buf.Bytes()...)
}
}
slog.Info("request json info", "hash_d_final", hexutil.Encode(d))
hash = sha256.Sum256(d)
slog.Info("request json info", "hash_final", hexutil.Encode(hash[:]))
}
Expand Down

0 comments on commit 8837046

Please sign in to comment.