libs/log: format []byte as hexidecimal string (uppercased) (#5960)

Closes: #5806 

Co-authored-by: Lanie Hei <heixx011@umn.edu>
This commit is contained in:
Anton Kaliaev
2021-01-25 16:25:29 +04:00
committed by GitHub
co-authored by Lanie Hei
parent 7e0436c6e6
commit d76add65a6
12 changed files with 130 additions and 39 deletions
+3 -3
View File
@@ -776,7 +776,7 @@ func TxKey(tx types.Tx) [TxKeySize]byte {
return sha256.Sum256(tx)
}
// txID is the hex encoded hash of the bytes as a types.Tx.
func txID(tx []byte) string {
return fmt.Sprintf("%X", types.Tx(tx).Hash())
// txID is a hash of the Tx.
func txID(tx []byte) []byte {
return types.Tx(tx).Hash()
}