cmd/swarm/swarm-smoke-pss: simplify msgidx function

This commit is contained in:
Rafael Matias 2019-03-26 12:06:59 +01:00
parent 5778993be4
commit 48b0374cbc
No known key found for this signature in database
GPG key ID: 1BC39532FB4A2DBD
2 changed files with 1 additions and 4 deletions

View file

@ -39,7 +39,6 @@ var (
var ( var (
allhosts string allhosts string
hosts []string hosts []string
filesize int
inputSeed int inputSeed int
wsPort int wsPort int
verbosity int verbosity int

View file

@ -336,7 +336,5 @@ func (s *pssSession) sendSymMessage(sender *pssNode, receiver *pssNode, msg []by
} }
func toMsgIdx(msg []byte) string { func toMsgIdx(msg []byte) string {
h := sha1.New() return fmt.Sprintf("%x", sha1.Sum(msg))
h.Write(msg)
return string(h.Sum(nil))
} }