Skip to content

Commit 09047fe

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

File tree

17 files changed

+17
-18
lines changed

17 files changed

+17
-18
lines changed

src/ethereum/arrow_glacier/fork.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def get_last_256_block_hashes(chain: BlockChain) -> List[Hash32]:
126126
if len(recent_blocks) == 0:
127127
return []
128128

129-
recent_block_hashes = []
129+
recent_block_hashes: List[Hash32] = []
130130

131131
for block in recent_blocks:
132132
prev_block_hash = block.header.parent_hash

src/ethereum/berlin/fork.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def get_last_256_block_hashes(chain: BlockChain) -> List[Hash32]:
122122
if len(recent_blocks) == 0:
123123
return []
124124

125-
recent_block_hashes = []
125+
recent_block_hashes: List[Hash32] = []
126126

127127
for block in recent_blocks:
128128
prev_block_hash = block.header.parent_hash

src/ethereum/byzantium/fork.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def get_last_256_block_hashes(chain: BlockChain) -> List[Hash32]:
117117
if len(recent_blocks) == 0:
118118
return []
119119

120-
recent_block_hashes = []
120+
recent_block_hashes: List[Hash32] = []
121121

122122
for block in recent_blocks:
123123
prev_block_hash = block.header.parent_hash

src/ethereum/cancun/fork.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def get_last_256_block_hashes(chain: BlockChain) -> List[Hash32]:
138138
if len(recent_blocks) == 0:
139139
return []
140140

141-
recent_block_hashes = []
141+
recent_block_hashes: List[Hash32] = []
142142

143143
for block in recent_blocks:
144144
prev_block_hash = block.header.parent_hash

src/ethereum/constantinople/fork.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def get_last_256_block_hashes(chain: BlockChain) -> List[Hash32]:
117117
if len(recent_blocks) == 0:
118118
return []
119119

120-
recent_block_hashes = []
120+
recent_block_hashes: List[Hash32] = []
121121

122122
for block in recent_blocks:
123123
prev_block_hash = block.header.parent_hash

src/ethereum/dao_fork/fork.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def get_last_256_block_hashes(chain: BlockChain) -> List[Hash32]:
121121
if len(recent_blocks) == 0:
122122
return []
123123

124-
recent_block_hashes = []
124+
recent_block_hashes: List[Hash32] = []
125125

126126
for block in recent_blocks:
127127
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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def get_last_256_block_hashes(chain: BlockChain) -> List[Hash32]:
126126
if len(recent_blocks) == 0:
127127
return []
128128

129-
recent_block_hashes = []
129+
recent_block_hashes: List[Hash32] = []
130130

131131
for block in recent_blocks:
132132
prev_block_hash = block.header.parent_hash

src/ethereum/homestead/fork.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def get_last_256_block_hashes(chain: BlockChain) -> List[Hash32]:
111111
if len(recent_blocks) == 0:
112112
return []
113113

114-
recent_block_hashes = []
114+
recent_block_hashes: List[Hash32] = []
115115

116116
for block in recent_blocks:
117117
prev_block_hash = block.header.parent_hash

src/ethereum/istanbul/fork.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def get_last_256_block_hashes(chain: BlockChain) -> List[Hash32]:
117117
if len(recent_blocks) == 0:
118118
return []
119119

120-
recent_block_hashes = []
120+
recent_block_hashes: List[Hash32] = []
121121

122122
for block in recent_blocks:
123123
prev_block_hash = block.header.parent_hash

0 commit comments

Comments
 (0)