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

Commit 4449e81

Browse files
author
Jan Xie
committed
optimize get_dunkle_candidates
1 parent d9caa62 commit 4449e81

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ethereum/casper_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,8 @@ def get_dunkle_candidates(chain, state, scan_limit=10):
243243
uncles = [x.header for x in potential_uncles if not call_casper(chain.state, 'isDunkleIncluded', [x.header.hash])]
244244
dunkle_txs = []
245245
ct = get_casper_ct()
246+
start_nonce = state.get_nonce(state.config['METROPOLIS_ENTRY_POINT'])
246247
for i, u in enumerate(uncles[:4]):
247-
start_nonce = state.get_nonce(state.config['METROPOLIS_ENTRY_POINT'])
248248
txdata = ct.encode('includeDunkle', [rlp.encode(u)])
249249
dunkle_txs.append(Transaction(start_nonce + i, 0, 650000, chain.config['CASPER_ADDR'], 0, txdata))
250250
return dunkle_txs

0 commit comments

Comments
 (0)