diff options
author | Viktor TrĂ³n <viktor.tron@gmail.com> | 2018-06-22 05:00:43 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-22 05:00:43 +0800 |
commit | eaff89291ce998ba4bf9b9816ca8a15c8b85f440 (patch) | |
tree | c77d7a06627a1a7f578d0fec8e39788e66672e53 /swarm/storage/swarmhasher.go | |
parent | d926bf2c7e3182d694c15829a37a0ca7331cd03c (diff) | |
parent | e187711c6545487d4cac3701f0f506bb536234e2 (diff) | |
download | dexon-eaff89291ce998ba4bf9b9816ca8a15c8b85f440.tar dexon-eaff89291ce998ba4bf9b9816ca8a15c8b85f440.tar.gz dexon-eaff89291ce998ba4bf9b9816ca8a15c8b85f440.tar.bz2 dexon-eaff89291ce998ba4bf9b9816ca8a15c8b85f440.tar.lz dexon-eaff89291ce998ba4bf9b9816ca8a15c8b85f440.tar.xz dexon-eaff89291ce998ba4bf9b9816ca8a15c8b85f440.tar.zst dexon-eaff89291ce998ba4bf9b9816ca8a15c8b85f440.zip |
Merge pull request #17041 from ethersphere/swarm-network-rewrite-merge
Swarm POC3 - happy solstice
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) } |