guard deneb specific ref in workaround

This commit is contained in:
Etan Kissling 2024-07-25 21:59:15 +02:00
parent a0cd63697d
commit 5e582cff8f
No known key found for this signature in database
GPG Key ID: B21DA824C5A3D03D
1 changed files with 4 additions and 2 deletions

View File

@ -398,14 +398,16 @@ template withForkyBlckAndBlobs(
# Nim 2.0.8: `forks.BlobSidecars(blobFork)` does not work here:
# > type mismatch: got 'BlobFork' for 'blobFork`gensym15'
# but expected 'BlobSidecars'
var fBlobs: deneb.BlobSidecars
when blobFork == BlobFork.Deneb:
var fBlobs: deneb.BlobSidecars
for blob in blobs.get:
doAssert blob.kind == blobFork,
"Must verify blob inclusion proof before `enqueueBlock`"
fBlobs.add blob.forky(blobFork)
Opt.some fBlobs
else:
Opt.none deneb.BlobSidecars
when blobFork == BlobFork.Deneb:
Opt.none deneb.BlobSidecars
else:
doAssert blobs.isNone, "Blobs are not supported before Deneb"
let forkyBlobs {.inject, used.} = Opt.none deneb.BlobSidecars