18 lines
393 B
Python
18 lines
393 B
Python
import unittest
|
|
import binascii
|
|
|
|
import kasten
|
|
|
|
import onionrblocks
|
|
|
|
class TestVDFBlock(unittest.TestCase):
|
|
|
|
def test_basic(self):
|
|
rounds = 10**4
|
|
k = onionrblocks.create_block_anonymous_vdf(rounds, b'test', **{'type': 'test', 'encrypt mode': 0})
|
|
raw = k.data
|
|
id = binascii.hexlify(k.id)
|
|
kasten.generator.vdf_verify(raw, id, rounds)
|
|
|
|
|
|
unittest.main() |