swarm: network rewrite merge
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user