add cache check

This commit is contained in:
Martin Holst Swende 2020-01-20 21:35:25 +01:00
parent 996c4d1319
commit b1756c4312
No known key found for this signature in database
GPG key ID: 683B438C05A5DDF0

View file

@ -208,4 +208,9 @@ func TestEthashVerification(t *testing.T) {
if bytes.Equal(expDigest, digest) { if bytes.Equal(expDigest, digest) {
t.Errorf("Mix digest wrong!, got %x exp %x", digest, expDigest) t.Errorf("Mix digest wrong!, got %x exp %x", digest, expDigest)
} }
sum := uint32(0)
for _, val := range cache.cache {
sum = sum ^ val
}
fmt.Printf("xor sum of cache contents: %x\n", sum)
} }