{"action":"created","comment":{"url":"https://api.github.com/repos/CityOfZion/neo-python/pulls/comments/173722773","pull_request_review_id":102956580,"id":173722773,"diff_hunk":"@@ -933,6 +941,31 @@ def run(self):\n                 traceback.print_exc()\n \n \n+def check_privatenet():\n+    \"\"\" Check if privatenet is running, and if container is same as the chain file \"\"\"\n+    rpc_settings.setup(settings.RPC_LIST)\n+    client = RPCClient()\n+    version = client.get_version()\n+    print(\"Privatenet useragent '%s', nonce: %s\" % (version[\"useragent\"], version[\"nonce\"]))\n+    if not version:\n+        logger.error(\"Error: private network doesn't seem to be running\")\n+        return\n+\n+    # Now check if nonce is the same as in the chain path\n+    nonce_container = str(version[\"nonce\"])\n+    neopy_chain_meta_filename = os.path.join(settings.LEVELDB_PATH, \".privnet-nonce\")\n+    if os.path.isfile(neopy_chain_meta_filename):\n+        nonce_chain = open(neopy_chain_meta_filename, \"r\").read()\n+        if nonce_chain != nonce_container:\n+            raise PrivnetWrongChainDatabaseError(\n+                \"Chain database in Chains/privnet is for a different private network than the current container (or RPC is not enabled). \"","path":"prompt.py","position":50,"original_position":50,"commit_id":"9196baa91b8360aa31e09d11307ac7b6f5ed8910","original_commit_id":"9196baa91b8360aa31e09d11307ac7b6f5ed8910","user":{"login":"ixje","id":6625537,"avatar_url":"https://avatars0.githubusercontent.com/u/6625537?v=4","gravatar_id":"","url":"https://api.github.com/users/ixje","html_url":"https://github.com/ixje","followers_url":"https://api.github.com/users/ixje/followers","following_url":"https://api.github.com/users/ixje/following{/other_user}","gists_url":"https://api.github.com/users/ixje/gists{/gist_id}","starred_url":"https://api.github.com/users/ixje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ixje/subscriptions","organizations_url":"https://api.github.com/users/ixje/orgs","repos_url":"https://api.github.com/users/ixje/repos","events_url":"https://api.github.com/users/ixje/events{/privacy}","received_events_url":"https://api.github.com/users/ixje/received_events","type":"User","site_admin":false},"body":"🥇 ","created_at":"2018-03-12T08:46:10Z","updated_at":"2018-03-12T08:46:10Z","html_url":"https://github.com/CityOfZion/neo-python/pull/308#discussion_r173722773","pull_request_url":"https://api.github.com/repos/CityOfZion/neo-python/pulls/308","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/CityOfZion/neo-python/pulls/comments/173722773"},"html":{"href":"https://github.com/CityOfZion/neo-python/pull/308#discussion_r173722773"},"pull_request":{"href":"https://api.github.com/repos/CityOfZion/neo-python/pulls/308"}},"in_reply_to_id":173633188},"pull_request":{"url":"https://api.github.com/repos/CityOfZion/neo-python/pulls/308","id":174164593,"html_url":"https://github.com/CityOfZion/neo-python/pull/308","diff_url":"https://github.com/CityOfZion/neo-python/pull/308.diff","patch_url":"https://github.com/CityOfZion/neo-python/pull/308.patch","issue_url":"https://api.github.com/repos/CityOfZion/neo-python/issues/308","number":308,"state":"closed","locked":false,"title":"Privnet chain check","user":{"login":"metachris","id":116939,"avatar_url":"https://avatars1.githubusercontent.com/u/116939?v=4","gravatar_id":"","url":"https://api.github.com/users/metachris","html_url":"https://github.com/metachris","followers_url":"https://api.github.com/users/metachris/followers","following_url":"https://api.github.com/users/metachris/following{/other_user}","gists_url":"https://api.github.com/users/metachris/gists{/gist_id}","starred_url":"https://api.github.com/users/metachris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metachris/subscriptions","organizations_url":"https://api.github.com/users/metachris/orgs","repos_url":"https://api.github.com/users/metachris/repos","events_url":"https://api.github.com/users/metachris/events{/privacy}","received_events_url":"https://api.github.com/users/metachris/received_events","type":"User","site_admin":false},"body":"**What current issue(s) does this address, or what feature is it adding?**\r\n\r\nIn prompt.py, added a check if the privnet database is of the same privnet container. An old database is a common error case, without an error message and the only indicator a not increasing block count.\r\n\r\n**How did you solve this problem?**\r\n\r\nCode\r\n\r\n**How did you make sure your solution works?**\r\n\r\nTest\r\n\r\n**Are there any special changes in the code that we should be aware of?**\r\n\r\nNo\r\n\r\n**Please check the following, if applicable:**\r\n\r\n- [ ] Did you add any tests?\r\n- [X] Did you run `make lint`?\r\n- [X] Did you run `make test`?\r\n- [X] Are you making a PR to a feature branch or development rather than master?\r\n- [X] Did you add an entry to `CHANGELOG.rst`? (if not, please do)\r\n","created_at":"2018-03-10T10:40:26Z","updated_at":"2018-03-12T08:46:10Z","closed_at":"2018-03-11T13:14:59Z","merged_at":"2018-03-11T13:14:59Z","merge_commit_sha":"f93d1b7f6f129a32e8f627e3dafab2f67594ed7c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/CityOfZion/neo-python/pulls/308/commits","review_comments_url":"https://api.github.com/repos/CityOfZion/neo-python/pulls/308/comments","review_comment_url":"https://api.github.com/repos/CityOfZion/neo-python/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CityOfZion/neo-python/issues/308/comments","statuses_url":"https://api.github.com/repos/CityOfZion/neo-python/statuses/9196baa91b8360aa31e09d11307ac7b6f5ed8910","head":{"label":"CityOfZion:privnet-chain-check","ref":"privnet-chain-check","sha":"9196baa91b8360aa31e09d11307ac7b6f5ed8910","user":{"login":"CityOfZion","id":29782569,"avatar_url":"https://avatars1.githubusercontent.com/u/29782569?v=4","gravatar_id":"","url":"https://api.github.com/users/CityOfZion","html_url":"https://github.com/CityOfZion","followers_url":"https://api.github.com/users/CityOfZion/followers","following_url":"https://api.github.com/users/CityOfZion/following{/other_user}","gists_url":"https://api.github.com/users/CityOfZion/gists{/gist_id}","starred_url":"https://api.github.com/users/CityOfZion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CityOfZion/subscriptions","organizations_url":"https://api.github.com/users/CityOfZion/orgs","repos_url":"https://api.github.com/users/CityOfZion/repos","events_url":"https://api.github.com/users/CityOfZion/events{/privacy}","received_events_url":"https://api.github.com/users/CityOfZion/received_events","type":"Organization","site_admin":false},"repo":{"id":97416422,"name":"neo-python","full_name":"CityOfZion/neo-python","owner":{"login":"CityOfZion","id":29782569,"avatar_url":"https://avatars1.githubusercontent.com/u/29782569?v=4","gravatar_id":"","url":"https://api.github.com/users/CityOfZion","html_url":"https://github.com/CityOfZion","followers_url":"https://api.github.com/users/CityOfZion/followers","following_url":"https://api.github.com/users/CityOfZion/following{/other_user}","gists_url":"https://api.github.com/users/CityOfZion/gists{/gist_id}","starred_url":"https://api.github.com/users/CityOfZion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CityOfZion/subscriptions","organizations_url":"https://api.github.com/users/CityOfZion/orgs","repos_url":"https://api.github.com/users/CityOfZion/repos","events_url":"https://api.github.com/users/CityOfZion/events{/privacy}","received_events_url":"https://api.github.com/users/CityOfZion/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CityOfZion/neo-python","description":"Python Node and SDK for the NEO blockchain","fork":false,"url":"https://api.github.com/repos/CityOfZion/neo-python","forks_url":"https://api.github.com/repos/CityOfZion/neo-python/forks","keys_url":"https://api.github.com/repos/CityOfZion/neo-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CityOfZion/neo-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CityOfZion/neo-python/teams","hooks_url":"https://api.github.com/repos/CityOfZion/neo-python/hooks","issue_events_url":"https://api.github.com/repos/CityOfZion/neo-python/issues/events{/number}","events_url":"https://api.github.com/repos/CityOfZion/neo-python/events","assignees_url":"https://api.github.com/repos/CityOfZion/neo-python/assignees{/user}","branches_url":"https://api.github.com/repos/CityOfZion/neo-python/branches{/branch}","tags_url":"https://api.github.com/repos/CityOfZion/neo-python/tags","blobs_url":"https://api.github.com/repos/CityOfZion/neo-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CityOfZion/neo-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CityOfZion/neo-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/CityOfZion/neo-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CityOfZion/neo-python/statuses/{sha}","languages_url":"https://api.github.com/repos/CityOfZion/neo-python/languages","stargazers_url":"https://api.github.com/repos/CityOfZion/neo-python/stargazers","contributors_url":"https://api.github.com/repos/CityOfZion/neo-python/contributors","subscribers_url":"https://api.github.com/repos/CityOfZion/neo-python/subscribers","subscription_url":"https://api.github.com/repos/CityOfZion/neo-python/subscription","commits_url":"https://api.github.com/repos/CityOfZion/neo-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/CityOfZion/neo-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/CityOfZion/neo-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/CityOfZion/neo-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/CityOfZion/neo-python/contents/{+path}","compare_url":"https://api.github.com/repos/CityOfZion/neo-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CityOfZion/neo-python/merges","archive_url":"https://api.github.com/repos/CityOfZion/neo-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CityOfZion/neo-python/downloads","issues_url":"https://api.github.com/repos/CityOfZion/neo-python/issues{/number}","pulls_url":"https://api.github.com/repos/CityOfZion/neo-python/pulls{/number}","milestones_url":"https://api.github.com/repos/CityOfZion/neo-python/milestones{/number}","notifications_url":"https://api.github.com/repos/CityOfZion/neo-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CityOfZion/neo-python/labels{/name}","releases_url":"https://api.github.com/repos/CityOfZion/neo-python/releases{/id}","deployments_url":"https://api.github.com/repos/CityOfZion/neo-python/deployments","created_at":"2017-07-16T23:05:32Z","updated_at":"2018-03-10T05:31:24Z","pushed_at":"2018-03-11T20:53:25Z","git_url":"git://github.com/CityOfZion/neo-python.git","ssh_url":"git@github.com:CityOfZion/neo-python.git","clone_url":"https://github.com/CityOfZion/neo-python.git","svn_url":"https://github.com/CityOfZion/neo-python","homepage":"https://neo-python.readthedocs.io/en/latest/","size":118313,"stargazers_count":160,"watchers_count":160,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":94,"mirror_url":null,"archived":false,"open_issues_count":28,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":94,"open_issues":28,"watchers":160,"default_branch":"master"}},"base":{"label":"CityOfZion:development","ref":"development","sha":"1c04f57245f457a93c03736172c0b03fe739cbaf","user":{"login":"CityOfZion","id":29782569,"avatar_url":"https://avatars1.githubusercontent.com/u/29782569?v=4","gravatar_id":"","url":"https://api.github.com/users/CityOfZion","html_url":"https://github.com/CityOfZion","followers_url":"https://api.github.com/users/CityOfZion/followers","following_url":"https://api.github.com/users/CityOfZion/following{/other_user}","gists_url":"https://api.github.com/users/CityOfZion/gists{/gist_id}","starred_url":"https://api.github.com/users/CityOfZion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CityOfZion/subscriptions","organizations_url":"https://api.github.com/users/CityOfZion/orgs","repos_url":"https://api.github.com/users/CityOfZion/repos","events_url":"https://api.github.com/users/CityOfZion/events{/privacy}","received_events_url":"https://api.github.com/users/CityOfZion/received_events","type":"Organization","site_admin":false},"repo":{"id":97416422,"name":"neo-python","full_name":"CityOfZion/neo-python","owner":{"login":"CityOfZion","id":29782569,"avatar_url":"https://avatars1.githubusercontent.com/u/29782569?v=4","gravatar_id":"","url":"https://api.github.com/users/CityOfZion","html_url":"https://github.com/CityOfZion","followers_url":"https://api.github.com/users/CityOfZion/followers","following_url":"https://api.github.com/users/CityOfZion/following{/other_user}","gists_url":"https://api.github.com/users/CityOfZion/gists{/gist_id}","starred_url":"https://api.github.com/users/CityOfZion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CityOfZion/subscriptions","organizations_url":"https://api.github.com/users/CityOfZion/orgs","repos_url":"https://api.github.com/users/CityOfZion/repos","events_url":"https://api.github.com/users/CityOfZion/events{/privacy}","received_events_url":"https://api.github.com/users/CityOfZion/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CityOfZion/neo-python","description":"Python Node and SDK for the NEO blockchain","fork":false,"url":"https://api.github.com/repos/CityOfZion/neo-python","forks_url":"https://api.github.com/repos/CityOfZion/neo-python/forks","keys_url":"https://api.github.com/repos/CityOfZion/neo-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CityOfZion/neo-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CityOfZion/neo-python/teams","hooks_url":"https://api.github.com/repos/CityOfZion/neo-python/hooks","issue_events_url":"https://api.github.com/repos/CityOfZion/neo-python/issues/events{/number}","events_url":"https://api.github.com/repos/CityOfZion/neo-python/events","assignees_url":"https://api.github.com/repos/CityOfZion/neo-python/assignees{/user}","branches_url":"https://api.github.com/repos/CityOfZion/neo-python/branches{/branch}","tags_url":"https://api.github.com/repos/CityOfZion/neo-python/tags","blobs_url":"https://api.github.com/repos/CityOfZion/neo-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CityOfZion/neo-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CityOfZion/neo-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/CityOfZion/neo-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CityOfZion/neo-python/statuses/{sha}","languages_url":"https://api.github.com/repos/CityOfZion/neo-python/languages","stargazers_url":"https://api.github.com/repos/CityOfZion/neo-python/stargazers","contributors_url":"https://api.github.com/repos/CityOfZion/neo-python/contributors","subscribers_url":"https://api.github.com/repos/CityOfZion/neo-python/subscribers","subscription_url":"https://api.github.com/repos/CityOfZion/neo-python/subscription","commits_url":"https://api.github.com/repos/CityOfZion/neo-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/CityOfZion/neo-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/CityOfZion/neo-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/CityOfZion/neo-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/CityOfZion/neo-python/contents/{+path}","compare_url":"https://api.github.com/repos/CityOfZion/neo-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CityOfZion/neo-python/merges","archive_url":"https://api.github.com/repos/CityOfZion/neo-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CityOfZion/neo-python/downloads","issues_url":"https://api.github.com/repos/CityOfZion/neo-python/issues{/number}","pulls_url":"https://api.github.com/repos/CityOfZion/neo-python/pulls{/number}","milestones_url":"https://api.github.com/repos/CityOfZion/neo-python/milestones{/number}","notifications_url":"https://api.github.com/repos/CityOfZion/neo-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CityOfZion/neo-python/labels{/name}","releases_url":"https://api.github.com/repos/CityOfZion/neo-python/releases{/id}","deployments_url":"https://api.github.com/repos/CityOfZion/neo-python/deployments","created_at":"2017-07-16T23:05:32Z","updated_at":"2018-03-10T05:31:24Z","pushed_at":"2018-03-11T20:53:25Z","git_url":"git://github.com/CityOfZion/neo-python.git","ssh_url":"git@github.com:CityOfZion/neo-python.git","clone_url":"https://github.com/CityOfZion/neo-python.git","svn_url":"https://github.com/CityOfZion/neo-python","homepage":"https://neo-python.readthedocs.io/en/latest/","size":118313,"stargazers_count":160,"watchers_count":160,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":94,"mirror_url":null,"archived":false,"open_issues_count":28,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":94,"open_issues":28,"watchers":160,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CityOfZion/neo-python/pulls/308"},"html":{"href":"https://github.com/CityOfZion/neo-python/pull/308"},"issue":{"href":"https://api.github.com/repos/CityOfZion/neo-python/issues/308"},"comments":{"href":"https://api.github.com/repos/CityOfZion/neo-python/issues/308/comments"},"review_comments":{"href":"https://api.github.com/repos/CityOfZion/neo-python/pulls/308/comments"},"review_comment":{"href":"https://api.github.com/repos/CityOfZion/neo-python/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CityOfZion/neo-python/pulls/308/commits"},"statuses":{"href":"https://api.github.com/repos/CityOfZion/neo-python/statuses/9196baa91b8360aa31e09d11307ac7b6f5ed8910"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"ixje"}}