Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -440,7 +440,17 @@ def get_my_chain_rec(recipient_name=None):
|
|
| 440 |
message = f"Error loading from: {recipient_name}"
|
| 441 |
return ["Error Loading Chain"],message
|
| 442 |
|
| 443 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 444 |
def mychain_mine_block_send(balance, chain_r=None,chain_n=None):
|
| 445 |
previous_block = mychain_send.print_previous_block()
|
| 446 |
previous_proof = previous_block['proof']
|
|
@@ -484,15 +494,7 @@ def mychain_mine_block_rec(balance, chain_r=None,chain_n=None):
|
|
| 484 |
show_chain=display_chain_rec()
|
| 485 |
message = "New Chain Created at Max 20 Blocks"
|
| 486 |
return response, show_chain, message
|
| 487 |
-
|
| 488 |
-
response = {'chain': mychain_send.chain,
|
| 489 |
-
'length': len(mychain_send.chain)}
|
| 490 |
-
return response
|
| 491 |
-
|
| 492 |
-
def display_chain_rec():
|
| 493 |
-
response = {'chain': mychain_rec.chain,
|
| 494 |
-
'length': len(mychain_rec.chain)}
|
| 495 |
-
return response
|
| 496 |
|
| 497 |
def issue_tokens(send,rec,amount):
|
| 498 |
response_send=None
|
|
|
|
| 440 |
message = f"Error loading from: {recipient_name}"
|
| 441 |
return ["Error Loading Chain"],message
|
| 442 |
|
| 443 |
+
def display_chain_send():
|
| 444 |
+
response = {'chain': mychain_send.chain,
|
| 445 |
+
'length': len(mychain_send.chain)}
|
| 446 |
+
return response
|
| 447 |
+
|
| 448 |
+
def display_chain_rec():
|
| 449 |
+
response = {'chain': mychain_rec.chain,
|
| 450 |
+
'length': len(mychain_rec.chain)}
|
| 451 |
+
return response
|
| 452 |
+
|
| 453 |
+
|
| 454 |
def mychain_mine_block_send(balance, chain_r=None,chain_n=None):
|
| 455 |
previous_block = mychain_send.print_previous_block()
|
| 456 |
previous_proof = previous_block['proof']
|
|
|
|
| 494 |
show_chain=display_chain_rec()
|
| 495 |
message = "New Chain Created at Max 20 Blocks"
|
| 496 |
return response, show_chain, message
|
| 497 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 498 |
|
| 499 |
def issue_tokens(send,rec,amount):
|
| 500 |
response_send=None
|