Fix blobkey calculation (#4978)

This commit is contained in:
henridf 2023-05-19 18:51:13 +02:00 committed by GitHub
parent 1cf777c64b
commit 7fb9a51c76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -250,6 +250,8 @@ func blobkey(root: Eth2Digest, index: BlobIndex) : array[40, byte] =
ret[0..<8] = toBytes(index) ret[0..<8] = toBytes(index)
ret[8..<40] = root.data ret[8..<40] = root.data
ret
template expectDb(x: auto): untyped = template expectDb(x: auto): untyped =
# There's no meaningful error handling implemented for a corrupt database or # There's no meaningful error handling implemented for a corrupt database or
# full disk - this requires manual intervention, so we'll panic for now # full disk - this requires manual intervention, so we'll panic for now