From 8c5aa2cd824f5d93d5702b8d3fa3895196e53b71 Mon Sep 17 00:00:00 2001 From: Muneeb Ali Date: Mon, 28 Jul 2014 02:05:49 -0700 Subject: [PATCH] removed old files --- .../blockstack_registrar/tools/csv_reserve.py | 5 +- .../tools/registration_loop.py | 18 ----- .../blockstack_registrar/tools/tests.py | 66 ------------------- 3 files changed, 3 insertions(+), 86 deletions(-) delete mode 100755 blockstack_cli/blockstack_registrar/tools/registration_loop.py delete mode 100755 blockstack_cli/blockstack_registrar/tools/tests.py diff --git a/blockstack_cli/blockstack_registrar/tools/csv_reserve.py b/blockstack_cli/blockstack_registrar/tools/csv_reserve.py index e782ba6b9..ae62c799c 100755 --- a/blockstack_cli/blockstack_registrar/tools/csv_reserve.py +++ b/blockstack_cli/blockstack_registrar/tools/csv_reserve.py @@ -48,8 +48,9 @@ def main_loop(key, name=None): reply = queue.find_one({'key':key}) if check_registration(key): - #print "already registered: " + key - profile = namecoind_name_show(key)['value'] + + profile = namecoind_name_show(key) + profile = profile['value'] if 'status' in profile and profile['status'] == 'reserved': print "already reserved: " + key update_name(key,value) diff --git a/blockstack_cli/blockstack_registrar/tools/registration_loop.py b/blockstack_cli/blockstack_registrar/tools/registration_loop.py deleted file mode 100755 index cf6fa2262..000000000 --- a/blockstack_cli/blockstack_registrar/tools/registration_loop.py +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -from tools.onename_register import check_new_registrations -from tools.onename_activate import do_name_firstupdate - -from time import sleep - -POLLING_INTERVAL = 10 - -#----------------------------------- -if __name__ == '__main__': - - while(1): - check_new_registrations() - do_name_firstupdate() - print "sleeping ... " - sleep(POLLING_INTERVAL) diff --git a/blockstack_cli/blockstack_registrar/tools/tests.py b/blockstack_cli/blockstack_registrar/tools/tests.py deleted file mode 100755 index cfbf667c3..000000000 --- a/blockstack_cli/blockstack_registrar/tools/tests.py +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - - -import json -import csv - -from coinrpc.coinrpc import check_registration, namecoind_name_show -from tools.onename_register import process_user, utf8len - -from pymongo import MongoClient -import os - -MONGODB_URI = os.environ['MONGODB_URI'] -HEROKU_APP = os.environ['HEROKU_APP'] -remote_client = MongoClient(MONGODB_URI) -users = remote_client[HEROKU_APP].user - -local_client = MongoClient() -registered = local_client['onename'].registered -queue = local_client['namecoin'].queue - -#----------------------------------- -def check_linked_list(key): - - if check_registration(key): - - check_profile = namecoind_name_show(key) - - check_profile = check_profile['value'] - - if 'next' in check_profile: - return check_linked_list(check_profile['next']) - else: - return True - else: - return False - -#----------------------------------- -if __name__ == '__main__': - - for user in users.find(): - - username = user['username'] - key = 'u/' + username - - check = registered.find_one({"username":username}) - - if check is not None: - continue - - in_queue = queue.find_one({"username":username}) - - if in_queue is not None: - continue - - process_user(user['username'],json.loads(user['profile'])) - - ''' - if check_linked_list(key): - print "Registered: " + username - registered.insert(user) - else: - print "Not registered: " + username - ''' -#-----------------------------------