func doubleSha256(b []byte) []byte {
	hasher := sha256.New()
	hasher.Write(b)
	sum := hasher.Sum(nil)
	hasher.Reset()
	hasher.Write(sum)
	return hasher.Sum(nil)
}
doubleSha256 calculates sha256(sha256(b)) and returns the resulting bytes.
package p2p
import (
	"crypto/sha256"
)