Exemple #1
0
def list_blocks():
    return BlockController.list_blocks()
Exemple #2
0
def find_by_block_number(block_number):
    return BlockController.find_by_block_number(block_number)
Exemple #3
0
def receive_block():
    return BlockController.receive_block(request, miner_url)
Exemple #4
0
def create_block():
    return BlockController.create_block(miner_url)
Exemple #5
0
def fetch_all_blocks():
    return BlockController.fetch_all_blocks()
Exemple #6
0
def receive_block():
    return BlockController.receive_block(request)
Exemple #7
0
def mine():
    node_number = str(app.config['NODE_NUMBER'])
    node_url = 'http://node' + node_number + ':500' + node_number
    miner_address = app.config['NODE_ADDRESS']
    return BlockController.mine(node_url, miner_address)