mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
Improve error handling in TestBlockSync
I managed to run into this error case and was unsure about the reason until I added this error handling. So I think it is worth it to spend the extra three lines to get a proper error message.
This commit is contained in:
parent
733fcbbc65
commit
51c42bc2ba
1 changed files with 4 additions and 1 deletions
|
|
@ -70,7 +70,10 @@ func TestBlockSync(t *testing.T) {
|
||||||
t.Helper()
|
t.Helper()
|
||||||
var expNumber, headNumber uint64
|
var expNumber, headNumber uint64
|
||||||
if expHead != nil {
|
if expHead != nil {
|
||||||
p, _ := expHead.ExecutionPayload()
|
p, err := expHead.ExecutionPayload()
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("expHead.ExecutionPayload() failed: %v", err)
|
||||||
|
}
|
||||||
expNumber = p.NumberU64()
|
expNumber = p.NumberU64()
|
||||||
}
|
}
|
||||||
select {
|
select {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue