Skip to content

Commit 950136c

Browse files
hwwhwwralexstokes
andauthored
Apply suggestions from code review
Co-authored-by: Alex Stokes <[email protected]>
1 parent 9c1acbb commit 950136c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

specs/_features/eip7594/das-core.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,19 +106,19 @@ def get_custody_columns(node_id: NodeID, custody_subnet_count: uint64) -> Sequen
106106
assert custody_subnet_count <= DATA_COLUMN_SIDECAR_SUBNET_COUNT
107107

108108
subnet_ids: List[uint64] = []
109-
tmp_id = uint256(node_id)
109+
i = uint256(node_id)
110110
while len(subnet_ids) < custody_subnet_count:
111111
# Overflow prevention
112-
if tmp_id == UINT256_MAX:
113-
tmp_id = NodeID(0)
112+
if i == UINT256_MAX:
113+
i = NodeID(0)
114114

115115
subnet_id = (
116-
bytes_to_uint64(hash(uint_to_bytes(uint256(tmp_id)))[0:8])
116+
bytes_to_uint64(hash(uint_to_bytes(uint256(i)))[0:8])
117117
% DATA_COLUMN_SIDECAR_SUBNET_COUNT
118118
)
119119
if subnet_id not in subnet_ids:
120120
subnet_ids.append(subnet_id)
121-
tmp_id += 1
121+
i += 1
122122

123123
assert len(subnet_ids) == len(set(subnet_ids))
124124

0 commit comments

Comments
 (0)