Files
  • main.py
  • blockchain.py
  • wibble.json
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import blockchain
from pprint import pprint
import sys

pprint(blockchain.__version__)

bc = blockchain.BlockChain('wibble.json')

print('Blockchain with serial "{}" loaded.'.format(bc.__serial__))

#bc.append('foo')
#bc.append('bar')
#bc.append('baz')
dbc = blockchain.DelegatedBlockChain(bc.delegate())
dbc.append('biz')
dbc.append('buz')
dbc.append('fiz')
bc.re_integrate(dbc.block_frag_dict)
bc.close()

print(bc.block_json)
print()
pprint(dbc.block_frag_dict)
sys.exit(0)