21 lines
512 B
Python
21 lines
512 B
Python
import unittest
|
|
import binascii
|
|
|
|
import kasten
|
|
|
|
import onionrblocks
|
|
|
|
class TestVDFBlock(unittest.TestCase):
|
|
|
|
def test_basic(self):
|
|
rounds = 10**4
|
|
data = b'test data'
|
|
k = onionrblocks.create_block_anonymous_vdf(rounds, data, **{'type': 'test', 'encrypt mode': 0})
|
|
raw = k.raw_bytes
|
|
id = int.from_bytes(k.hex_checksum, byteorder="big")
|
|
#print(id, raw)
|
|
print(raw)
|
|
kasten.generator.KastenMimcGenerator.validate_id(id, raw, rounds)
|
|
|
|
|
|
unittest.main() |