mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-07 15:38:37 +00:00
internal: if err happend just return it
This commit is contained in:
parent
1abbae239d
commit
b94d711546
1 changed files with 3 additions and 1 deletions
|
|
@ -627,7 +627,9 @@ func (b *simBackend) HeaderByHash(ctx context.Context, hash common.Hash) (*types
|
|||
if b.base.Hash() == hash {
|
||||
return b.base, nil
|
||||
}
|
||||
if header, err := b.b.HeaderByHash(ctx, hash); err == nil {
|
||||
if header, err := b.b.HeaderByHash(ctx, hash); err != nil {
|
||||
return nil, err
|
||||
} else if header != nil {
|
||||
return header, nil
|
||||
}
|
||||
// Check simulated headers
|
||||
|
|
|
|||
Loading…
Reference in a new issue