예제 #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
예제 #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
예제 #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
예제 #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