beacon/engine: only print the bad hash on error (#35112)

Better error messages on the engine api
This commit is contained in:
cui 2026-06-09 20:15:49 +08:00 committed by GitHub
parent 1f87331fbc
commit 10614fc423
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -295,7 +295,7 @@ func ExecutableDataToBlockNoHash(data ExecutableData, versionedHashes []common.H
} }
for i := 0; i < len(blobHashes); i++ { for i := 0; i < len(blobHashes); i++ {
if blobHashes[i] != versionedHashes[i] { if blobHashes[i] != versionedHashes[i] {
return nil, fmt.Errorf("invalid versionedHash at %v: %v blobHashes: %v", i, versionedHashes, blobHashes) return nil, fmt.Errorf("invalid versionedHash at %v: %v blobHash: %v", i, versionedHashes[i], blobHashes[i])
} }
} }
// Only set withdrawalsRoot if it is non-nil. This allows CLs to use // Only set withdrawalsRoot if it is non-nil. This allows CLs to use