From 950136c50d75c0f89bac42910743ae78fa59907a Mon Sep 17 00:00:00 2001 From: Hsiao-Wei Wang Date: Tue, 7 May 2024 18:30:28 +0800 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Alex Stokes --- specs/_features/eip7594/das-core.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/specs/_features/eip7594/das-core.md b/specs/_features/eip7594/das-core.md index 905108ae2..4607facd9 100644 --- a/specs/_features/eip7594/das-core.md +++ b/specs/_features/eip7594/das-core.md @@ -106,19 +106,19 @@ def get_custody_columns(node_id: NodeID, custody_subnet_count: uint64) -> Sequen assert custody_subnet_count <= DATA_COLUMN_SIDECAR_SUBNET_COUNT subnet_ids: List[uint64] = [] - tmp_id = uint256(node_id) + i = uint256(node_id) while len(subnet_ids) < custody_subnet_count: # Overflow prevention - if tmp_id == UINT256_MAX: - tmp_id = NodeID(0) + if i == UINT256_MAX: + i = NodeID(0) subnet_id = ( - bytes_to_uint64(hash(uint_to_bytes(uint256(tmp_id)))[0:8]) + bytes_to_uint64(hash(uint_to_bytes(uint256(i)))[0:8]) % DATA_COLUMN_SIDECAR_SUBNET_COUNT ) if subnet_id not in subnet_ids: subnet_ids.append(subnet_id) - tmp_id += 1 + i += 1 assert len(subnet_ids) == len(set(subnet_ids))