{"action":"created","comment":{"url":"https://api.github.com/repos/namecoin/namecoin-core/pulls/comments/53564702","id":53564702,"diff_hunk":"@@ -668,3 +686,210 @@ bool WalletModel::saveReceiveRequest(const std::string &sAddress, const int64_t\n     else\n         return wallet->AddDestData(dest, key, sRequest);\n }\n+\n+bool WalletModel::nameAvailable(const QString &name)\n+{\n+    UniValue params (UniValue::VOBJ);\n+    UniValue res, array, isExpired;\n+\n+    const std::string strName = name.toStdString();\n+    params.push_back (Pair(\"name\", strName));\n+\n+    try {\n+        res = name_show( params, false);","path":"src/qt/walletmodel.cpp","position":79,"original_position":79,"commit_id":"9f2ff2a03482a2aa345e34244fbb9607fb102113","original_commit_id":"9f2ff2a03482a2aa345e34244fbb9607fb102113","user":{"login":"domob1812","id":4943644,"avatar_url":"https://avatars.githubusercontent.com/u/4943644?v=3","gravatar_id":"","url":"https://api.github.com/users/domob1812","html_url":"https://github.com/domob1812","followers_url":"https://api.github.com/users/domob1812/followers","following_url":"https://api.github.com/users/domob1812/following{/other_user}","gists_url":"https://api.github.com/users/domob1812/gists{/gist_id}","starred_url":"https://api.github.com/users/domob1812/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domob1812/subscriptions","organizations_url":"https://api.github.com/users/domob1812/orgs","repos_url":"https://api.github.com/users/domob1812/repos","events_url":"https://api.github.com/users/domob1812/events{/privacy}","received_events_url":"https://api.github.com/users/domob1812/received_events","type":"User","site_admin":false},"body":"In general, I like the way you try to avoid code duplication using the RPC interface.  In this case, however, I think that just querying the name database directly is not too complicated.  You can try to do that instead of calling `name_show` - unless you prefer to call `name_show` nevertheless and think this is easier for you.  I'll leave this decision to you.","created_at":"2016-02-21T10:24:54Z","updated_at":"2016-02-21T10:24:54Z","html_url":"https://github.com/namecoin/namecoin-core/pull/67#discussion_r53564702","pull_request_url":"https://api.github.com/repos/namecoin/namecoin-core/pulls/67","_links":{"self":{"href":"https://api.github.com/repos/namecoin/namecoin-core/pulls/comments/53564702"},"html":{"href":"https://github.com/namecoin/namecoin-core/pull/67#discussion_r53564702"},"pull_request":{"href":"https://api.github.com/repos/namecoin/namecoin-core/pulls/67"}}},"pull_request":{"url":"https://api.github.com/repos/namecoin/namecoin-core/pulls/67","id":60079481,"html_url":"https://github.com/namecoin/namecoin-core/pull/67","diff_url":"https://github.com/namecoin/namecoin-core/pull/67.diff","patch_url":"https://github.com/namecoin/namecoin-core/pull/67.patch","issue_url":"https://api.github.com/repos/namecoin/namecoin-core/issues/67","number":67,"state":"open","locked":false,"title":"qt re-implementation of manage names","user":{"login":"brandonrobertz","id":2670795,"avatar_url":"https://avatars.githubusercontent.com/u/2670795?v=3","gravatar_id":"","url":"https://api.github.com/users/brandonrobertz","html_url":"https://github.com/brandonrobertz","followers_url":"https://api.github.com/users/brandonrobertz/followers","following_url":"https://api.github.com/users/brandonrobertz/following{/other_user}","gists_url":"https://api.github.com/users/brandonrobertz/gists{/gist_id}","starred_url":"https://api.github.com/users/brandonrobertz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brandonrobertz/subscriptions","organizations_url":"https://api.github.com/users/brandonrobertz/orgs","repos_url":"https://api.github.com/users/brandonrobertz/repos","events_url":"https://api.github.com/users/brandonrobertz/events{/privacy}","received_events_url":"https://api.github.com/users/brandonrobertz/received_events","type":"User","site_admin":false},"body":"This is a merge and partial re-write of \"manage names\" tab from namecoin legacy on top of namecoin-core. I used the RPC functions, internally, to do the heavy lifting. The previous QT UI duplicated much of the code. I also moved the manage names UI from a separate popup to a tab in the main UI.\r\n\r\nI tried to keep the patch footprint as small as possible. If anyone sees room to make it even smaller, please comment. A major goal here was to minimize the probability of conflicts in the future.\r\n\r\nSome of the code you see here is directly merged from the legacy names page UI. Please let me know if you see problems in it.\r\n\r\nSome areas that warrant extra consideration:\r\n- The changes in `src/qt/transactionrecord.cpp` were 100% taken from legacy. They might not be necessary.\r\n- The changes in `walletdb.cpp` are very important and should have code review.\r\n- Testing using different QT/GUI config settings would be helpful\r\n","created_at":"2016-02-21T08:50:37Z","updated_at":"2016-02-21T10:24:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e01f460f8d258b83ae67f5e5cf47d36bb5137aab","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/namecoin/namecoin-core/pulls/67/commits","review_comments_url":"https://api.github.com/repos/namecoin/namecoin-core/pulls/67/comments","review_comment_url":"https://api.github.com/repos/namecoin/namecoin-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/namecoin/namecoin-core/issues/67/comments","statuses_url":"https://api.github.com/repos/namecoin/namecoin-core/statuses/9f2ff2a03482a2aa345e34244fbb9607fb102113","head":{"label":"brandonrobertz:master","ref":"master","sha":"9f2ff2a03482a2aa345e34244fbb9607fb102113","user":{"login":"brandonrobertz","id":2670795,"avatar_url":"https://avatars.githubusercontent.com/u/2670795?v=3","gravatar_id":"","url":"https://api.github.com/users/brandonrobertz","html_url":"https://github.com/brandonrobertz","followers_url":"https://api.github.com/users/brandonrobertz/followers","following_url":"https://api.github.com/users/brandonrobertz/following{/other_user}","gists_url":"https://api.github.com/users/brandonrobertz/gists{/gist_id}","starred_url":"https://api.github.com/users/brandonrobertz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brandonrobertz/subscriptions","organizations_url":"https://api.github.com/users/brandonrobertz/orgs","repos_url":"https://api.github.com/users/brandonrobertz/repos","events_url":"https://api.github.com/users/brandonrobertz/events{/privacy}","received_events_url":"https://api.github.com/users/brandonrobertz/received_events","type":"User","site_admin":false},"repo":{"id":50142842,"name":"namecoin-core","full_name":"brandonrobertz/namecoin-core","owner":{"login":"brandonrobertz","id":2670795,"avatar_url":"https://avatars.githubusercontent.com/u/2670795?v=3","gravatar_id":"","url":"https://api.github.com/users/brandonrobertz","html_url":"https://github.com/brandonrobertz","followers_url":"https://api.github.com/users/brandonrobertz/followers","following_url":"https://api.github.com/users/brandonrobertz/following{/other_user}","gists_url":"https://api.github.com/users/brandonrobertz/gists{/gist_id}","starred_url":"https://api.github.com/users/brandonrobertz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brandonrobertz/subscriptions","organizations_url":"https://api.github.com/users/brandonrobertz/orgs","repos_url":"https://api.github.com/users/brandonrobertz/repos","events_url":"https://api.github.com/users/brandonrobertz/events{/privacy}","received_events_url":"https://api.github.com/users/brandonrobertz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/brandonrobertz/namecoin-core","description":"Namecoin Core QT GUI re-implementation (EXPERIMENTAL)","fork":true,"url":"https://api.github.com/repos/brandonrobertz/namecoin-core","forks_url":"https://api.github.com/repos/brandonrobertz/namecoin-core/forks","keys_url":"https://api.github.com/repos/brandonrobertz/namecoin-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brandonrobertz/namecoin-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brandonrobertz/namecoin-core/teams","hooks_url":"https://api.github.com/repos/brandonrobertz/namecoin-core/hooks","issue_events_url":"https://api.github.com/repos/brandonrobertz/namecoin-core/issues/events{/number}","events_url":"https://api.github.com/repos/brandonrobertz/namecoin-core/events","assignees_url":"https://api.github.com/repos/brandonrobertz/namecoin-core/assignees{/user}","branches_url":"https://api.github.com/repos/brandonrobertz/namecoin-core/branches{/branch}","tags_url":"https://api.github.com/repos/brandonrobertz/namecoin-core/tags","blobs_url":"https://api.github.com/repos/brandonrobertz/namecoin-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brandonrobertz/namecoin-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brandonrobertz/namecoin-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/brandonrobertz/namecoin-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brandonrobertz/namecoin-core/statuses/{sha}","languages_url":"https://api.github.com/repos/brandonrobertz/namecoin-core/languages","stargazers_url":"https://api.github.com/repos/brandonrobertz/namecoin-core/stargazers","contributors_url":"https://api.github.com/repos/brandonrobertz/namecoin-core/contributors","subscribers_url":"https://api.github.com/repos/brandonrobertz/namecoin-core/subscribers","subscription_url":"https://api.github.com/repos/brandonrobertz/namecoin-core/subscription","commits_url":"https://api.github.com/repos/brandonrobertz/namecoin-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/brandonrobertz/namecoin-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/brandonrobertz/namecoin-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/brandonrobertz/namecoin-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/brandonrobertz/namecoin-core/contents/{+path}","compare_url":"https://api.github.com/repos/brandonrobertz/namecoin-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brandonrobertz/namecoin-core/merges","archive_url":"https://api.github.com/repos/brandonrobertz/namecoin-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brandonrobertz/namecoin-core/downloads","issues_url":"https://api.github.com/repos/brandonrobertz/namecoin-core/issues{/number}","pulls_url":"https://api.github.com/repos/brandonrobertz/namecoin-core/pulls{/number}","milestones_url":"https://api.github.com/repos/brandonrobertz/namecoin-core/milestones{/number}","notifications_url":"https://api.github.com/repos/brandonrobertz/namecoin-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brandonrobertz/namecoin-core/labels{/name}","releases_url":"https://api.github.com/repos/brandonrobertz/namecoin-core/releases{/id}","deployments_url":"https://api.github.com/repos/brandonrobertz/namecoin-core/deployments","created_at":"2016-01-21T23:05:17Z","updated_at":"2016-01-25T04:45:31Z","pushed_at":"2016-02-21T08:19:50Z","git_url":"git://github.com/brandonrobertz/namecoin-core.git","ssh_url":"git@github.com:brandonrobertz/namecoin-core.git","clone_url":"https://github.com/brandonrobertz/namecoin-core.git","svn_url":"https://github.com/brandonrobertz/namecoin-core","homepage":"","size":49788,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"namecoin:master","ref":"master","sha":"42884634f7af033d5d2c066ee12c51a58c927293","user":{"login":"namecoin","id":1068524,"avatar_url":"https://avatars.githubusercontent.com/u/1068524?v=3","gravatar_id":"","url":"https://api.github.com/users/namecoin","html_url":"https://github.com/namecoin","followers_url":"https://api.github.com/users/namecoin/followers","following_url":"https://api.github.com/users/namecoin/following{/other_user}","gists_url":"https://api.github.com/users/namecoin/gists{/gist_id}","starred_url":"https://api.github.com/users/namecoin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/namecoin/subscriptions","organizations_url":"https://api.github.com/users/namecoin/orgs","repos_url":"https://api.github.com/users/namecoin/repos","events_url":"https://api.github.com/users/namecoin/events{/privacy}","received_events_url":"https://api.github.com/users/namecoin/received_events","type":"Organization","site_admin":false},"repo":{"id":30645800,"name":"namecoin-core","full_name":"namecoin/namecoin-core","owner":{"login":"namecoin","id":1068524,"avatar_url":"https://avatars.githubusercontent.com/u/1068524?v=3","gravatar_id":"","url":"https://api.github.com/users/namecoin","html_url":"https://github.com/namecoin","followers_url":"https://api.github.com/users/namecoin/followers","following_url":"https://api.github.com/users/namecoin/following{/other_user}","gists_url":"https://api.github.com/users/namecoin/gists{/gist_id}","starred_url":"https://api.github.com/users/namecoin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/namecoin/subscriptions","organizations_url":"https://api.github.com/users/namecoin/orgs","repos_url":"https://api.github.com/users/namecoin/repos","events_url":"https://api.github.com/users/namecoin/events{/privacy}","received_events_url":"https://api.github.com/users/namecoin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/namecoin/namecoin-core","description":"Reimplementation of Namecoin on top of the current Bitcoin Core codebase.","fork":true,"url":"https://api.github.com/repos/namecoin/namecoin-core","forks_url":"https://api.github.com/repos/namecoin/namecoin-core/forks","keys_url":"https://api.github.com/repos/namecoin/namecoin-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/namecoin/namecoin-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/namecoin/namecoin-core/teams","hooks_url":"https://api.github.com/repos/namecoin/namecoin-core/hooks","issue_events_url":"https://api.github.com/repos/namecoin/namecoin-core/issues/events{/number}","events_url":"https://api.github.com/repos/namecoin/namecoin-core/events","assignees_url":"https://api.github.com/repos/namecoin/namecoin-core/assignees{/user}","branches_url":"https://api.github.com/repos/namecoin/namecoin-core/branches{/branch}","tags_url":"https://api.github.com/repos/namecoin/namecoin-core/tags","blobs_url":"https://api.github.com/repos/namecoin/namecoin-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/namecoin/namecoin-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/namecoin/namecoin-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/namecoin/namecoin-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/namecoin/namecoin-core/statuses/{sha}","languages_url":"https://api.github.com/repos/namecoin/namecoin-core/languages","stargazers_url":"https://api.github.com/repos/namecoin/namecoin-core/stargazers","contributors_url":"https://api.github.com/repos/namecoin/namecoin-core/contributors","subscribers_url":"https://api.github.com/repos/namecoin/namecoin-core/subscribers","subscription_url":"https://api.github.com/repos/namecoin/namecoin-core/subscription","commits_url":"https://api.github.com/repos/namecoin/namecoin-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/namecoin/namecoin-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/namecoin/namecoin-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/namecoin/namecoin-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/namecoin/namecoin-core/contents/{+path}","compare_url":"https://api.github.com/repos/namecoin/namecoin-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/namecoin/namecoin-core/merges","archive_url":"https://api.github.com/repos/namecoin/namecoin-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/namecoin/namecoin-core/downloads","issues_url":"https://api.github.com/repos/namecoin/namecoin-core/issues{/number}","pulls_url":"https://api.github.com/repos/namecoin/namecoin-core/pulls{/number}","milestones_url":"https://api.github.com/repos/namecoin/namecoin-core/milestones{/number}","notifications_url":"https://api.github.com/repos/namecoin/namecoin-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/namecoin/namecoin-core/labels{/name}","releases_url":"https://api.github.com/repos/namecoin/namecoin-core/releases{/id}","deployments_url":"https://api.github.com/repos/namecoin/namecoin-core/deployments","created_at":"2015-02-11T12:02:31Z","updated_at":"2016-02-16T10:16:02Z","pushed_at":"2016-02-21T08:50:37Z","git_url":"git://github.com/namecoin/namecoin-core.git","ssh_url":"git@github.com:namecoin/namecoin-core.git","clone_url":"https://github.com/namecoin/namecoin-core.git","svn_url":"https://github.com/namecoin/namecoin-core","homepage":null,"size":49901,"stargazers_count":55,"watchers_count":55,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":22,"mirror_url":null,"open_issues_count":31,"forks":22,"open_issues":31,"watchers":55,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/namecoin/namecoin-core/pulls/67"},"html":{"href":"https://github.com/namecoin/namecoin-core/pull/67"},"issue":{"href":"https://api.github.com/repos/namecoin/namecoin-core/issues/67"},"comments":{"href":"https://api.github.com/repos/namecoin/namecoin-core/issues/67/comments"},"review_comments":{"href":"https://api.github.com/repos/namecoin/namecoin-core/pulls/67/comments"},"review_comment":{"href":"https://api.github.com/repos/namecoin/namecoin-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/namecoin/namecoin-core/pulls/67/commits"},"statuses":{"href":"https://api.github.com/repos/namecoin/namecoin-core/statuses/9f2ff2a03482a2aa345e34244fbb9607fb102113"}}}}