Omnibus commited on
Commit
c53a7ad
·
1 Parent(s): b3c047d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -2
app.py CHANGED
@@ -700,7 +700,14 @@ with gr.Blocks() as bc:
700
  z=False
701
  return response,z
702
 
703
-
 
 
 
 
 
 
 
704
  check_trans.click(deep_trans,None,[block_text,out_box_bool])
705
 
706
  reset_sender.click(res_send,send,block_text)
@@ -719,7 +726,7 @@ with gr.Blocks() as bc:
719
  #check_all.click(sort_valid,None,block_text)
720
 
721
  #send_trans.click(bc_transactions,[send,rec,am],[trans_data,block_text,send,rec,am])
722
- mine_b.click(bc_utils.mine_block,[chain_repo,chain_n],[json_out,chain_json,trans_data,block_text])
723
 
724
 
725
  bc.launch(enable_queue=False)
 
700
  z=False
701
  return response,z
702
 
703
+ def mine_block():
704
+ try:
705
+ a,b,c,d = bc_utils.mine_block(chain_r=None,chain_n=None)
706
+ mychain_trans.reset(create=trans_name)
707
+ return a,b,c,d
708
+ except Exception as e:
709
+ print (e)
710
+ return e,None,None,e
711
  check_trans.click(deep_trans,None,[block_text,out_box_bool])
712
 
713
  reset_sender.click(res_send,send,block_text)
 
726
  #check_all.click(sort_valid,None,block_text)
727
 
728
  #send_trans.click(bc_transactions,[send,rec,am],[trans_data,block_text,send,rec,am])
729
+ mine_b.click(mine_block,[chain_repo,chain_n],[json_out,chain_json,trans_data,block_text])
730
 
731
 
732
  bc.launch(enable_queue=False)