print(signed_hex) print(sent_tx) print("Export TX not successfully created") sys.exit() sent_tx_list.append(sent_tx) counter_raw = counter_raw - 1 print(str(len(sent_tx_list)) + " export transactions sent:\n") for sent_tx in sent_tx_list: print(sent_tx + "\n") # Wait for a confirmation on source chain while True: confirmed = all( int( rpc_connection_sourcechain.gettransaction(sent_tx) ["confirmations"]) > 0 for sent_tx in sent_tx_list) if not confirmed: print( "Waiting for all export transactions to be confirmed on source chain" ) time.sleep(5) else: print("All export transactions confirmed!") break # Use migrate_createimporttransaction to create the import TX import_list = [] while True: import_tx_created = all( create_import_transactions(rpc_connection_sourcechain, signed_hex, payouts, import_list)
while True: start_utxo_maker = input("Do you want to make more UTXOs? y/n: ") if start_utxo_maker == "y": utxos_amount = int(input("Input amount of UTXOs you want to make: ")) amount_for_utxo = 0.1 while utxos_amount > 0: source_utxo = rpc_connection_sourcechain.sendtoaddress( address, amount_for_utxo) destination_utxo = rpc_connection_destinationchain.sendtoaddress( address, amount_for_utxo) time.sleep(0.1) utxos_amount = utxos_amount - 1 amount_for_utxo = amount_for_utxo + 0.11 while True: confirmations_source = int( rpc_connection_sourcechain.gettransaction(source_utxo) ["confirmations"]) confirmations_destination = int( rpc_connection_destinationchain.gettransaction( destination_utxo)["confirmations"]) if confirmations_source > 0 and confirmations_destination > 0: print("Seems more UTXOs created") utxos_sourcechain = len( rpc_connection_sourcechain.listunspent()) utxos_destinationchain = len( rpc_connection_destinationchain.listunspent()) print(str(utxos_sourcechain) + " source chain UTXOs\n") print( str(utxos_destinationchain) + " destination chain UTXOs\n") break else: print("Let's wait more...")