Esempio n. 1
0
def test_get_cache_size_based_on_EPOCH():
    for _ in range(100):
        block_num = randint(0, 12456789)
        out1 = pyethash.get_cache_size(block_num)
        out2 = pyethash.get_cache_size(
            (block_num // pyethash.EPOCH_LENGTH) * pyethash.EPOCH_LENGTH)
        assert out1 == out2
Esempio n. 2
0
def test_get_cache_size_not_None():
    for _ in range(100):
        block_num = randint(0,12456789)
        out = pyethash.get_cache_size(block_num)
        assert out != None
Esempio n. 3
0
def test_get_cache_size_based_on_EPOCH():
    for _ in range(100):
        block_num = randint(0,12456789)
        out1 = pyethash.get_cache_size(block_num)
        out2 = pyethash.get_cache_size((block_num // pyethash.EPOCH_LENGTH) * pyethash.EPOCH_LENGTH)
        assert out1 == out2
Esempio n. 4
0
def test_get_cache_size_not_None():
    for _ in range(100):
        block_num = randint(0, 12456789)
        out = pyethash.get_cache_size(block_num)
        assert out != None