From 88bdc6ae55c530bc5ccfcf6a6a07a54290245950 Mon Sep 17 00:00:00 2001 From: Etan Kissling Date: Thu, 25 Jul 2024 21:59:49 +0200 Subject: [PATCH] `Opt[Forky]` does not work as it does in `ref` and `seq` / `openArray` --- beacon_chain/gossip_processing/block_processor.nim | 4 ++-- beacon_chain/spec/forks.nim | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/beacon_chain/gossip_processing/block_processor.nim b/beacon_chain/gossip_processing/block_processor.nim index bb7f7fd29..d5414da77 100644 --- a/beacon_chain/gossip_processing/block_processor.nim +++ b/beacon_chain/gossip_processing/block_processor.nim @@ -173,7 +173,7 @@ from ../consensus_object_pools/block_clearance import proc storeBackfillBlock( self: var BlockProcessor, signedBlock: ForkySignedBeaconBlock, - blobsOpt: Opt[ForkyBlobSidecars] + blobsOpt: OptForkyBlobSidecars ): Result[void, VerifierError] = const consensusFork = typeof(signedBlock).kind @@ -441,7 +441,7 @@ proc enqueueBlock*( proc storeBlock( self: ref BlockProcessor, src: MsgSource, wallTime: BeaconTime, signedBlock: ForkySignedBeaconBlock, - blobsOpt: Opt[ForkyBlobSidecars], + blobsOpt: OptForkyBlobSidecars, maybeFinalized = false, queueTick: Moment = Moment.now(), validationDur = Duration() diff --git a/beacon_chain/spec/forks.nim b/beacon_chain/spec/forks.nim index 3262070e0..f0c749a2d 100644 --- a/beacon_chain/spec/forks.nim +++ b/beacon_chain/spec/forks.nim @@ -283,6 +283,9 @@ type ForkyBlobSidecars* = deneb.BlobSidecars + OptForkyBlobSidecars* = + Opt[deneb.BlobSidecars] + ForkedBlobSidecar* = object case kind*: BlobFork of BlobFork.Deneb: