Skip to content

Commit 75c0570

Browse files
committed
pyright fixes (*/fork.py)
1 parent 4223590 commit 75c0570

File tree

17 files changed

+17
-34
lines changed

17 files changed

+17
-34
lines changed

src/ethereum/arrow_glacier/fork.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,10 @@ def get_last_256_block_hashes(chain: BlockChain) -> List[Hash32]:
122122
Hashes of the recent 256 blocks in order of increasing block number.
123123
"""
124124
recent_blocks = chain.blocks[-255:]
125-
# TODO: This function has not been tested rigorously
126125
if len(recent_blocks) == 0:
127126
return []
128127

129-
recent_block_hashes = []
128+
recent_block_hashes: List[Hash32] = []
130129

131130
for block in recent_blocks:
132131
prev_block_hash = block.header.parent_hash

src/ethereum/berlin/fork.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,10 @@ def get_last_256_block_hashes(chain: BlockChain) -> List[Hash32]:
118118
Hashes of the recent 256 blocks in order of increasing block number.
119119
"""
120120
recent_blocks = chain.blocks[-255:]
121-
# TODO: This function has not been tested rigorously
122121
if len(recent_blocks) == 0:
123122
return []
124123

125-
recent_block_hashes = []
124+
recent_block_hashes: List[Hash32] = []
126125

127126
for block in recent_blocks:
128127
prev_block_hash = block.header.parent_hash

src/ethereum/byzantium/fork.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,10 @@ def get_last_256_block_hashes(chain: BlockChain) -> List[Hash32]:
113113
Hashes of the recent 256 blocks in order of increasing block number.
114114
"""
115115
recent_blocks = chain.blocks[-255:]
116-
# TODO: This function has not been tested rigorously
117116
if len(recent_blocks) == 0:
118117
return []
119118

120-
recent_block_hashes = []
119+
recent_block_hashes: List[Hash32] = []
121120

122121
for block in recent_blocks:
123122
prev_block_hash = block.header.parent_hash

src/ethereum/cancun/fork.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,10 @@ def get_last_256_block_hashes(chain: BlockChain) -> List[Hash32]:
134134
Hashes of the recent 256 blocks in order of increasing block number.
135135
"""
136136
recent_blocks = chain.blocks[-255:]
137-
# TODO: This function has not been tested rigorously
138137
if len(recent_blocks) == 0:
139138
return []
140139

141-
recent_block_hashes = []
140+
recent_block_hashes: List[Hash32] = []
142141

143142
for block in recent_blocks:
144143
prev_block_hash = block.header.parent_hash

src/ethereum/constantinople/fork.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,10 @@ def get_last_256_block_hashes(chain: BlockChain) -> List[Hash32]:
113113
Hashes of the recent 256 blocks in order of increasing block number.
114114
"""
115115
recent_blocks = chain.blocks[-255:]
116-
# TODO: This function has not been tested rigorously
117116
if len(recent_blocks) == 0:
118117
return []
119118

120-
recent_block_hashes = []
119+
recent_block_hashes: List[Hash32] = []
121120

122121
for block in recent_blocks:
123122
prev_block_hash = block.header.parent_hash

src/ethereum/dao_fork/fork.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,10 @@ def get_last_256_block_hashes(chain: BlockChain) -> List[Hash32]:
117117
Hashes of the recent 256 blocks in order of increasing block number.
118118
"""
119119
recent_blocks = chain.blocks[-255:]
120-
# TODO: This function has not been tested rigorously
121120
if len(recent_blocks) == 0:
122121
return []
123122

124-
recent_block_hashes = []
123+
recent_block_hashes: List[Hash32] = []
125124

126125
for block in recent_blocks:
127126
prev_block_hash = block.header.parent_hash

src/ethereum/frontier/fork.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,10 @@ def get_last_256_block_hashes(chain: BlockChain) -> List[Hash32]:
107107
Hashes of the recent 256 blocks in order of increasing block number.
108108
"""
109109
recent_blocks = chain.blocks[-255:]
110-
# TODO: This function has not been tested rigorously
111110
if len(recent_blocks) == 0:
112111
return []
113112

114-
recent_block_hashes = []
113+
recent_block_hashes: List[Hash32] = []
115114

116115
for block in recent_blocks:
117116
prev_block_hash = block.header.parent_hash

src/ethereum/gray_glacier/fork.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,10 @@ def get_last_256_block_hashes(chain: BlockChain) -> List[Hash32]:
122122
Hashes of the recent 256 blocks in order of increasing block number.
123123
"""
124124
recent_blocks = chain.blocks[-255:]
125-
# TODO: This function has not been tested rigorously
126125
if len(recent_blocks) == 0:
127126
return []
128127

129-
recent_block_hashes = []
128+
recent_block_hashes: List[Hash32] = []
130129

131130
for block in recent_blocks:
132131
prev_block_hash = block.header.parent_hash

src/ethereum/homestead/fork.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,10 @@ def get_last_256_block_hashes(chain: BlockChain) -> List[Hash32]:
107107
Hashes of the recent 256 blocks in order of increasing block number.
108108
"""
109109
recent_blocks = chain.blocks[-255:]
110-
# TODO: This function has not been tested rigorously
111110
if len(recent_blocks) == 0:
112111
return []
113112

114-
recent_block_hashes = []
113+
recent_block_hashes: List[Hash32] = []
115114

116115
for block in recent_blocks:
117116
prev_block_hash = block.header.parent_hash

src/ethereum/istanbul/fork.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,10 @@ def get_last_256_block_hashes(chain: BlockChain) -> List[Hash32]:
113113
Hashes of the recent 256 blocks in order of increasing block number.
114114
"""
115115
recent_blocks = chain.blocks[-255:]
116-
# TODO: This function has not been tested rigorously
117116
if len(recent_blocks) == 0:
118117
return []
119118

120-
recent_block_hashes = []
119+
recent_block_hashes: List[Hash32] = []
121120

122121
for block in recent_blocks:
123122
prev_block_hash = block.header.parent_hash

0 commit comments

Comments
 (0)