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

Commit a020c33

Browse files
authored
Merge pull request #709 from yuchao/develop
refs #295, use pycryptodome for sha3_256 in ethpow
2 parents ddaac54 + e8100a6 commit a020c33

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ethereum/ethpow.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from ethereum import ethash, ethash_utils, utils
22
import time
33
import sys
4-
import sha3
54
import warnings
65
from collections import OrderedDict
6+
from ethereum import utils
77
from ethereum.slogging import get_logger
88

99
log = get_logger('eth.pow')
@@ -40,7 +40,7 @@
4040

4141
def get_cache(block_number):
4242
while len(cache_seeds) <= block_number // EPOCH_LENGTH:
43-
cache_seeds.append(sha3.sha3_256(cache_seeds[-1]).digest())
43+
cache_seeds.append(utils.sha3(cache_seeds[-1]))
4444
seed = cache_seeds[block_number // EPOCH_LENGTH]
4545
if seed in cache_by_seed:
4646
c = cache_by_seed.pop(seed) # pop and append at end

0 commit comments

Comments
 (0)