mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Fix unit tests
This commit is contained in:
parent
9a3a82737b
commit
c3fab49e3f
1 changed files with 3 additions and 3 deletions
|
|
@ -43,12 +43,12 @@ func TestPoWCalculationsWith8LeadingZeros(t *testing.T) {
|
||||||
e := Envelope{
|
e := Envelope{
|
||||||
TTL: 1,
|
TTL: 1,
|
||||||
Data: []byte{0xde, 0xad, 0xbe, 0xef},
|
Data: []byte{0xde, 0xad, 0xbe, 0xef},
|
||||||
Nonce: 48159,
|
Nonce: 276,
|
||||||
}
|
}
|
||||||
e.calculatePoW(0)
|
e.calculatePoW(0)
|
||||||
|
|
||||||
if e.pow != 40329.846153846156 {
|
if e.pow != 19.692307692307693 {
|
||||||
t.Fatalf("invalid PoW calculation. Expected 0.07692307692307693, got %v", e.pow)
|
t.Fatalf("invalid PoW calculation. Expected 19.692307692307693, got %v", e.pow)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue