if no latest valid hash default to empty hash (#4411)

This commit is contained in:
Enrique Jose Avila Asapche 2022-06-09 03:47:33 +01:00 committed by GitHub
parent 935975bebd
commit 77e2934647
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -78,6 +78,8 @@ func convertPayloadStatus(x *remote.EnginePayloadStatus) map[string]interface{}
}
if x.LatestValidHash != nil {
json["latestValidHash"] = common.Hash(gointerfaces.ConvertH256ToHash(x.LatestValidHash))
} else {
json["latestValidHash"] = common.Hash{}
}
if x.ValidationError != "" {
json["validationError"] = x.ValidationError