mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
add cache check
This commit is contained in:
parent
996c4d1319
commit
b1756c4312
1 changed files with 14 additions and 9 deletions
|
|
@ -204,8 +204,13 @@ func TestEthashVerification(t *testing.T) {
|
||||||
fmt.Printf("result: %x\n", result)
|
fmt.Printf("result: %x\n", result)
|
||||||
fmt.Println()
|
fmt.Println()
|
||||||
fmt.Printf("digest: %x\n", digest)
|
fmt.Printf("digest: %x\n", digest)
|
||||||
expDigest,_ := hexutil.Decode("07e6a1aad4823428980e8229335085c6e45599f3d65951ce7c796ad87081eb72")
|
expDigest, _ := hexutil.Decode("07e6a1aad4823428980e8229335085c6e45599f3d65951ce7c796ad87081eb72")
|
||||||
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)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue