From 51c42bc2ba78e10b38eee7a29801d5e5f32cd821 Mon Sep 17 00:00:00 2001 From: Karl Bartel Date: Wed, 21 Aug 2024 13:57:13 +0200 Subject: [PATCH] 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. --- beacon/blsync/block_sync_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/beacon/blsync/block_sync_test.go b/beacon/blsync/block_sync_test.go index 3d3b9e5e8d5b..e7c2c4d16311 100644 --- a/beacon/blsync/block_sync_test.go +++ b/beacon/blsync/block_sync_test.go @@ -70,7 +70,10 @@ func TestBlockSync(t *testing.T) { t.Helper() var expNumber, headNumber uint64 if expHead != nil { - p, _ := expHead.ExecutionPayload() + p, err := expHead.ExecutionPayload() + if err != nil { + t.Fatalf("expHead.ExecutionPayload() failed: %v", err) + } expNumber = p.NumberU64() } select {