def test_get_seedhash(): assert pyethash.get_seedhash(0).encode('hex') == '0' * 64 import hashlib, sha3 expected = pyethash.get_seedhash(0) #print "checking seed hashes:", for i in range(0, 30000*2048, 30000): #print i // 30000, assert pyethash.get_seedhash(i) == expected expected = hashlib.sha3_256(expected).digest()
def test_get_seedhash(): assert pyethash.get_seedhash(0).encode('hex') == '0' * 64 import hashlib, sha3 expected = pyethash.get_seedhash(0) #print "checking seed hashes:", for i in range(0, 30000 * 2048, 30000): #print i // 30000, assert pyethash.get_seedhash(i) == expected expected = hashlib.sha3_256(expected).digest()
def block_num_to_seed(block_number: int) -> bytes: """DS block number to seed hash.""" return get_seedhash(block_number)
def test_pyethash(self): import pyethash self.assertIsNotNone(pyethash.get_seedhash(0))
def block_num_to_seed(block_number: int) -> bytes: return get_seedhash(block_number)