mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
cmd/swarm/swarm-smoke-pss: simplify msgidx function
This commit is contained in:
parent
5778993be4
commit
48b0374cbc
2 changed files with 1 additions and 4 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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))
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue