rework initial block acceptance

This commit is contained in:
Agnish Ghosh 2024-10-08 03:52:36 +05:30
parent 1c9fe9432b
commit e11e03ebc7
1 changed files with 3 additions and 2 deletions

View File

@ -427,12 +427,13 @@ proc initFullNode(
# maybeFinalized = maybeFinalized)
when consensusFork >= ConsensusFork.Deneb:
if len(forkyBlck.message.body.blob_kzg_commitments) != 0:
if not dataColumnQuarantine[].hasDataColumns(forkyBlck) and
len(forkyBlck.message.body.blob_kzg_commitments) == 0:
if not quarantine[].addColumnless(dag.finalizedHead.slot, forkyBlck):
err(VerifierError.UnviableFork)
else:
err(VerifierError.MissingParent)
elif dataColumnQuarantine[].hasDataColumns(forkyBlck):
else:
let data_columns = dataColumnQuarantine[].popDataColumns(forkyBlck.root, forkyBlck)
await blockProcessor[].addBlock(MsgSource.gossip, signedBlock,
Opt.none(BlobSidecars), Opt.some(data_columns),