mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
fix BLOCKHASH test
This commit is contained in:
parent
78cce0e69d
commit
41a40b6570
1 changed files with 3 additions and 7 deletions
|
|
@ -248,11 +248,7 @@ func (d *dummyChain) GetHeader(h common.Hash, n uint64) *types.Header {
|
|||
}
|
||||
|
||||
func (d *dummyChain) Config() *params.ChainConfig {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (d *dummyChain) GetHeaderByNumber(n uint64) *types.Header {
|
||||
return d.GetHeader(common.Hash{}, n)
|
||||
return ¶ms.ChainConfig{}
|
||||
}
|
||||
|
||||
// TestBlockhash tests the blockhash operation. It's a bit special, since it internally
|
||||
|
|
@ -325,8 +321,8 @@ func TestBlockhash(t *testing.T) {
|
|||
if last.Uint64() != 744 {
|
||||
t.Fatalf("last block should be 744, got %d (%x)", last, ret[64:96])
|
||||
}
|
||||
if exp, got := 255, chain.counter; exp != got {
|
||||
t.Errorf("suboptimal; too much chain iteration, expected %d, got %d", exp, got)
|
||||
if exp, got := 256, chain.counter; exp != got {
|
||||
t.Errorf("suboptimal; too many chain iteration, expected %d, got %d", exp, got)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue