unique slots
This commit is contained in:
parent
11b8adeb54
commit
29463f2c44
|
@ -661,12 +661,13 @@ proc syncStep[A, B](man: SyncManager[A, B], index: int, peer: A)
|
||||||
|
|
||||||
if len(dataColumnData) > 0:
|
if len(dataColumnData) > 0:
|
||||||
let slots = mapIt(dataColumnData, it[].signed_block_header.message.slot)
|
let slots = mapIt(dataColumnData, it[].signed_block_header.message.slot)
|
||||||
if not(checkResponse(req, slots)):
|
let uniqueSlots = foldl(slots, combine(a, b), @[slots[0]])
|
||||||
|
if not(checkResponse(req, uniqueSlots)):
|
||||||
peer.updateScore(PeerScoreBadResponse)
|
peer.updateScore(PeerScoreBadResponse)
|
||||||
man.queue.push(req)
|
man.queue.push(req)
|
||||||
warn "Received data columns sequence is not in requested range",
|
warn "Received data columns sequence is not in requested range",
|
||||||
data_columns_count = len(dataColumnData), data_columns_map = getShortMap(req, dataColumnData),
|
data_columns_count = len(dataColumnData), data_columns_map = getShortMap(req, dataColumnData),
|
||||||
request = req
|
request = req, slots = uniqueSlots
|
||||||
return
|
return
|
||||||
let groupedDataColumns = groupDataColumns(req, blockData, dataColumnData)
|
let groupedDataColumns = groupDataColumns(req, blockData, dataColumnData)
|
||||||
if groupedDataColumns.isErr():
|
if groupedDataColumns.isErr():
|
||||||
|
|
Loading…
Reference in New Issue