def check_peercoin_conf(request): """ Get peercoin configuration and status of gpg / wallet / transaction index. """ conf = helpers.get_service_status() return HttpResponse(json.dumps({ "status": "success", "config": conf }, default=helpers.json_custom_parser), content_type='application/json')
def config_automatic_setup(request): """ Used on setup page, setup peercoin configuration for rpc_server. """ forced_updates = { "server": "1", "txindex": "1" } optional_updates = { "rpcuser": ''.join(random.choice('ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789') for _ in range(10)), "rpcpassword": ''.join(random.choice('ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789') for _ in range(10)), } helpers.edit_config(forced_updates, optional_updates) conf = helpers.get_service_status() return HttpResponse(json.dumps({ "status": "success", "config": conf }, default=helpers.json_custom_parser), content_type='application/json')