enqueue block first, before reconstruction
This commit is contained in:
parent
73dba1057f
commit
68f979098d
|
@ -393,9 +393,10 @@ proc processDataColumnSidecar*(
|
||||||
debug "Data column validated, putting data column in quarantine"
|
debug "Data column validated, putting data column in quarantine"
|
||||||
self.dataColumnQuarantine[].put(newClone(dataColumnSidecar))
|
self.dataColumnQuarantine[].put(newClone(dataColumnSidecar))
|
||||||
|
|
||||||
self.dag.db.putDataColumnSidecar(dataColumnSidecar)
|
if self.dataColumnQuarantine[].supernode == false:
|
||||||
debug "Validated column belongs to custody, attempting to persist",
|
self.dag.db.putDataColumnSidecar(dataColumnSidecar)
|
||||||
data_column = shortLog(dataColumnSidecar)
|
debug "Validated column belongs to custody, attempting to persist",
|
||||||
|
data_column = shortLog(dataColumnSidecar)
|
||||||
|
|
||||||
let block_root = hash_tree_root(block_header)
|
let block_root = hash_tree_root(block_header)
|
||||||
if (let o = self.quarantine[].popColumnless(block_root); o.isSome):
|
if (let o = self.quarantine[].popColumnless(block_root); o.isSome):
|
||||||
|
@ -417,6 +418,10 @@ proc processDataColumnSidecar*(
|
||||||
elif self.dataColumnQuarantine[].hasEnoughDataColumns(forkyBlck):
|
elif self.dataColumnQuarantine[].hasEnoughDataColumns(forkyBlck):
|
||||||
let
|
let
|
||||||
columns = self.dataColumnQuarantine[].gatherDataColumns(block_root)
|
columns = self.dataColumnQuarantine[].gatherDataColumns(block_root)
|
||||||
|
self.blockProcessor[].enqueueBlock(
|
||||||
|
MsgSource.gossip, columnless,
|
||||||
|
Opt.none(BlobSidecars),
|
||||||
|
Opt.some(self.dataColumnQuarantine[].popDataColumns(block_root, forkyBlck)))
|
||||||
if columns.len >= (NUMBER_OF_COLUMNS div 2) and
|
if columns.len >= (NUMBER_OF_COLUMNS div 2) and
|
||||||
self.dataColumnQuarantine[].supernode:
|
self.dataColumnQuarantine[].supernode:
|
||||||
let
|
let
|
||||||
|
@ -425,10 +430,7 @@ proc processDataColumnSidecar*(
|
||||||
for rc in reconstructed_columns.get:
|
for rc in reconstructed_columns.get:
|
||||||
if rc notin self.dataColumnQuarantine[].gatherDataColumns(block_root).mapIt(it[]):
|
if rc notin self.dataColumnQuarantine[].gatherDataColumns(block_root).mapIt(it[]):
|
||||||
self.dataColumnQuarantine[].put(newClone(rc))
|
self.dataColumnQuarantine[].put(newClone(rc))
|
||||||
self.blockProcessor[].enqueueBlock(
|
|
||||||
MsgSource.gossip, columnless,
|
|
||||||
Opt.none(BlobSidecars),
|
|
||||||
Opt.some(self.dataColumnQuarantine[].popDataColumns(block_root, forkyBlck)))
|
|
||||||
else:
|
else:
|
||||||
discard self.quarantine[].addColumnless(
|
discard self.quarantine[].addColumnless(
|
||||||
self.dag.finalizedHead.slot, forkyBlck)
|
self.dag.finalizedHead.slot, forkyBlck)
|
||||||
|
|
Loading…
Reference in New Issue