mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-15 17:15:37 +00:00
rm some unused code/imports (#6541)
This commit is contained in:
parent
9f7a1361bd
commit
1503c7dffe
@ -71,9 +71,6 @@ func len*(nodes: ProtoNodes): int =
|
|||||||
func add(nodes: var ProtoNodes, node: ProtoNode) =
|
func add(nodes: var ProtoNodes, node: ProtoNode) =
|
||||||
nodes.buf.add node
|
nodes.buf.add node
|
||||||
|
|
||||||
func isPreviousEpochJustified(self: ProtoArray): bool =
|
|
||||||
self.checkpoints.justified.epoch + 1 == self.currentEpoch
|
|
||||||
|
|
||||||
# Forward declarations
|
# Forward declarations
|
||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -9,13 +9,13 @@
|
|||||||
|
|
||||||
# Uncategorized helper functions from the spec
|
# Uncategorized helper functions from the spec
|
||||||
import
|
import
|
||||||
std/[algorithm, hashes],
|
std/algorithm,
|
||||||
results,
|
results,
|
||||||
eth/p2p/discoveryv5/[node],
|
eth/p2p/discoveryv5/[node],
|
||||||
./[helpers, digest],
|
./[helpers, digest],
|
||||||
./datatypes/[eip7594]
|
./datatypes/[eip7594]
|
||||||
|
|
||||||
proc sortedColumnIndices*(columnsPerSubnet: ColumnIndex,
|
func sortedColumnIndices*(columnsPerSubnet: ColumnIndex,
|
||||||
subnetIds: HashSet[uint64]):
|
subnetIds: HashSet[uint64]):
|
||||||
seq[ColumnIndex] =
|
seq[ColumnIndex] =
|
||||||
var res: seq[ColumnIndex] = @[]
|
var res: seq[ColumnIndex] = @[]
|
||||||
@ -26,7 +26,7 @@ proc sortedColumnIndices*(columnsPerSubnet: ColumnIndex,
|
|||||||
res.sort
|
res.sort
|
||||||
res
|
res
|
||||||
|
|
||||||
proc sortedColumnIndexList*(columnsPerSubnet: ColumnIndex,
|
func sortedColumnIndexList*(columnsPerSubnet: ColumnIndex,
|
||||||
subnetIds: HashSet[uint64]):
|
subnetIds: HashSet[uint64]):
|
||||||
List[ColumnIndex, NUMBER_OF_COLUMNS] =
|
List[ColumnIndex, NUMBER_OF_COLUMNS] =
|
||||||
var
|
var
|
||||||
@ -36,10 +36,9 @@ proc sortedColumnIndexList*(columnsPerSubnet: ColumnIndex,
|
|||||||
let index = DATA_COLUMN_SIDECAR_SUBNET_COUNT * i + subnetId
|
let index = DATA_COLUMN_SIDECAR_SUBNET_COUNT * i + subnetId
|
||||||
res.add(ColumnIndex(index))
|
res.add(ColumnIndex(index))
|
||||||
res.sort()
|
res.sort()
|
||||||
let list = List[ColumnIndex, NUMBER_OF_COLUMNS].init(res)
|
List[ColumnIndex, NUMBER_OF_COLUMNS].init(res)
|
||||||
list
|
|
||||||
|
|
||||||
proc get_custody_column_subnets*(node_id: NodeId,
|
func get_custody_column_subnets*(node_id: NodeId,
|
||||||
custody_subnet_count: uint64):
|
custody_subnet_count: uint64):
|
||||||
Result[HashSet[uint64], cstring] =
|
Result[HashSet[uint64], cstring] =
|
||||||
|
|
||||||
@ -76,7 +75,7 @@ proc get_custody_column_subnets*(node_id: NodeId,
|
|||||||
ok(subnet_ids)
|
ok(subnet_ids)
|
||||||
|
|
||||||
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.5/specs/_features/eip7594/das-core.md#get_custody_columns
|
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.5/specs/_features/eip7594/das-core.md#get_custody_columns
|
||||||
proc get_custody_columns*(node_id: NodeId,
|
func get_custody_columns*(node_id: NodeId,
|
||||||
custody_subnet_count: uint64):
|
custody_subnet_count: uint64):
|
||||||
seq[ColumnIndex] =
|
seq[ColumnIndex] =
|
||||||
let
|
let
|
||||||
@ -88,8 +87,7 @@ proc get_custody_columns*(node_id: NodeId,
|
|||||||
|
|
||||||
sortedColumnIndices(ColumnIndex(columns_per_subnet), subnet_ids)
|
sortedColumnIndices(ColumnIndex(columns_per_subnet), subnet_ids)
|
||||||
|
|
||||||
|
func get_custody_column_list*(node_id: NodeId,
|
||||||
proc get_custody_column_list*(node_id: NodeId,
|
|
||||||
custody_subnet_count: uint64):
|
custody_subnet_count: uint64):
|
||||||
List[ColumnIndex, NUMBER_OF_COLUMNS] =
|
List[ColumnIndex, NUMBER_OF_COLUMNS] =
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user