Skip to content
This repository was archived by the owner on May 23, 2023. It is now read-only.

Commit 818a91d

Browse files
committed
extract assignments from a loop
1 parent 9cda2e0 commit 818a91d

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

ethereum/blocks.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,13 +1168,11 @@ def finalize(self):
11681168
self.delta_balance(self.coinbase, delta)
11691169
self.ether_delta += delta
11701170

1171-
for uncle in self.uncles:
1172-
br = self.config['BLOCK_REWARD']
1173-
udpf = self.config['UNCLE_DEPTH_PENALTY_FACTOR']
1174-
un = uncle.number
1175-
bn = self.number
1171+
br = self.config['BLOCK_REWARD']
1172+
udpf = self.config['UNCLE_DEPTH_PENALTY_FACTOR']
11761173

1177-
r = int(br * (udpf + un - bn) // udpf)
1174+
for uncle in self.uncles:
1175+
r = int(br * (udpf + uncle.number - self.number) // udpf)
11781176

11791177
self.delta_balance(uncle.coinbase, r)
11801178
self.ether_delta += r

0 commit comments

Comments
 (0)