mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-31 16:58:31 +00:00
include data columns in addBlock that care about custody
This commit is contained in:
parent
66cb3ff54e
commit
07d1a26e59
@ -700,12 +700,12 @@ proc storeBlock(
|
|||||||
for b in blobs:
|
for b in blobs:
|
||||||
self.consensusManager.dag.db.putBlobSidecar(b[])
|
self.consensusManager.dag.db.putBlobSidecar(b[])
|
||||||
|
|
||||||
# # write data columns now that block has been written.
|
# write data columns now that block has been written.
|
||||||
# let data_columns = dataColumnsOpt.valueOr: DataColumnSidecars @[]
|
let data_columns = dataColumnsOpt.valueOr: DataColumnSidecars @[]
|
||||||
# for c in data_columns:
|
for c in data_columns:
|
||||||
# self.consensusManager.dag.db.putDataColumnSidecar(c[])
|
self.consensusManager.dag.db.putDataColumnSidecar(c[])
|
||||||
# debug "Data column written to database!",
|
debug "Data column written to database!",
|
||||||
# data_column = shortLog(c[])
|
data_column = shortLog(c[])
|
||||||
|
|
||||||
let addHeadBlockTick = Moment.now()
|
let addHeadBlockTick = Moment.now()
|
||||||
|
|
||||||
|
@ -208,7 +208,13 @@ proc routeSignedBeaconBlock*(
|
|||||||
data_column = shortLog(data_columns[i]), error = res.error[]
|
data_column = shortLog(data_columns[i]), error = res.error[]
|
||||||
else:
|
else:
|
||||||
notice "Data columns sent", data_column = shortLog(dataColumnsOpt[].get()[i])
|
notice "Data columns sent", data_column = shortLog(dataColumnsOpt[].get()[i])
|
||||||
dataColumnRefs = Opt.some(dataColumnsOpt[].get().mapIt(newClone(it)))
|
let
|
||||||
|
metadata = router[].network.metadata.custody_subnet_count.uint64
|
||||||
|
custody_columns = router[].network.nodeId.get_custody_columns(metadata)
|
||||||
|
|
||||||
|
for dc in data_columns:
|
||||||
|
if dc.index in custody_columns.get:
|
||||||
|
let dataColumnRefs = Opt.some(dataColumnsOpt[].get().mapIt(newClone(it)))
|
||||||
|
|
||||||
let added = await router[].blockProcessor[].addBlock(
|
let added = await router[].blockProcessor[].addBlock(
|
||||||
MsgSource.api, ForkedSignedBeaconBlock.init(blck), blobRefs, dataColumnRefs)
|
MsgSource.api, ForkedSignedBeaconBlock.init(blck), blobRefs, dataColumnRefs)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user