コード例 #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
ファイル: test_pyethash.py プロジェクト: 0xABCD/go-ethereum
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
ファイル: test_pyethash.py プロジェクト: 0xABCD/go-ethereum
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