diff options
author | ethersphere <thesw@rm.eth> | 2018-06-20 20:06:27 +0800 |
---|---|---|
committer | ethersphere <thesw@rm.eth> | 2018-06-22 03:10:31 +0800 |
commit | e187711c6545487d4cac3701f0f506bb536234e2 (patch) | |
tree | d2f6150f70b84b36e49a449082aeda267b4b9046 /swarm/storage/swarmhasher.go | |
parent | 574378edb50c907b532946a1d4654dbd6701b20a (diff) | |
download | dexon-e187711c6545487d4cac3701f0f506bb536234e2.tar dexon-e187711c6545487d4cac3701f0f506bb536234e2.tar.gz dexon-e187711c6545487d4cac3701f0f506bb536234e2.tar.bz2 dexon-e187711c6545487d4cac3701f0f506bb536234e2.tar.lz dexon-e187711c6545487d4cac3701f0f506bb536234e2.tar.xz dexon-e187711c6545487d4cac3701f0f506bb536234e2.tar.zst dexon-e187711c6545487d4cac3701f0f506bb536234e2.zip |
swarm: network rewrite merge
Diffstat (limited to 'swarm/storage/swarmhasher.go')
-rw-r--r-- | swarm/storage/swarmhasher.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/swarm/storage/swarmhasher.go b/swarm/storage/swarmhasher.go index 38b86373c..fae03f0c7 100644 --- a/swarm/storage/swarmhasher.go +++ b/swarm/storage/swarmhasher.go @@ -21,8 +21,9 @@ import ( ) const ( - BMTHash = "BMT" - SHA3Hash = "SHA3" // http://golang.org/pkg/hash/#Hash + BMTHash = "BMT" + SHA3Hash = "SHA3" // http://golang.org/pkg/hash/#Hash + DefaultHash = BMTHash ) type SwarmHash interface { @@ -34,7 +35,7 @@ type HashWithLength struct { hash.Hash } -func (self *HashWithLength) ResetWithLength(length []byte) { - self.Reset() - self.Write(length) +func (h *HashWithLength) ResetWithLength(length []byte) { + h.Reset() + h.Write(length) } |