{"action":"created","comment":{"url":"https://api.github.com/repos/zcash/zcash/pulls/comments/207425230","pull_request_review_id":143035467,"id":207425230,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNzQyNTIzMA==","diff_hunk":"@@ -1170,6 +1177,71 @@ void CWallet::UpdateNullifierNoteMapWithTx(const CWalletTx& wtx)\n                 mapSproutNullifiersToNotes[*item.second.nullifier] = item.first;\n             }\n         }\n+\n+        for (const mapSaplingNoteData_t::value_type& item : wtx.mapSaplingNoteData) {\n+            if (item.second.nullifier) {\n+                mapSaplingNullifiersToNotes[*item.second.nullifier] = item.first;\n+            }\n+        }\n+    }\n+}\n+\n+/**\n+ * Update mapSaplingNullifiersToNotes, computing the nullifier from a cached witness if necessary.\n+ */\n+void CWallet::UpdateSaplingNullifierNoteMapWithTx(CWalletTx& wtx) {\n+    LOCK(cs_wallet);\n+\n+    for (mapSaplingNoteData_t::value_type &item : wtx.mapSaplingNoteData) {\n+        SaplingOutPoint op = item.first;\n+        SaplingNoteData nd = item.second;\n+\n+        if (nd.witnesses.size() == 0) {\n+            // If there are no witnesses, erase the nullifier and associated mapping.\n+            if (item.second.nullifier) {\n+                mapSaplingNullifiersToNotes.erase(item.second.nullifier.get());\n+            }\n+            item.second.nullifier = boost::none;\n+        }\n+        else if (nd.witnesses.size() > 0) {","path":"src/wallet/wallet.cpp","position":160,"original_position":62,"commit_id":"0eb8d34d92282204a8e000808c837e165d228601","original_commit_id":"b37884c08f6cd11f08ef28e711e3975f83d0b209","user":{"login":"str4d","id":4993799,"node_id":"MDQ6VXNlcjQ5OTM3OTk=","avatar_url":"https://avatars0.githubusercontent.com/u/4993799?v=4","gravatar_id":"","url":"https://api.github.com/users/str4d","html_url":"https://github.com/str4d","followers_url":"https://api.github.com/users/str4d/followers","following_url":"https://api.github.com/users/str4d/following{/other_user}","gists_url":"https://api.github.com/users/str4d/gists{/gist_id}","starred_url":"https://api.github.com/users/str4d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/str4d/subscriptions","organizations_url":"https://api.github.com/users/str4d/orgs","repos_url":"https://api.github.com/users/str4d/repos","events_url":"https://api.github.com/users/str4d/events{/privacy}","received_events_url":"https://api.github.com/users/str4d/received_events","type":"User","site_admin":false},"body":"`} else {` should be sufficient, as `size()` [returns an unsigned integer](http://www.cplusplus.com/reference/list/list/size/).","created_at":"2018-08-03T02:21:39Z","updated_at":"2018-08-03T02:32:57Z","html_url":"https://github.com/zcash/zcash/pull/3422#discussion_r207425230","pull_request_url":"https://api.github.com/repos/zcash/zcash/pulls/3422","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/zcash/zcash/pulls/comments/207425230"},"html":{"href":"https://github.com/zcash/zcash/pull/3422#discussion_r207425230"},"pull_request":{"href":"https://api.github.com/repos/zcash/zcash/pulls/3422"}}},"pull_request":{"url":"https://api.github.com/repos/zcash/zcash/pulls/3422","id":204230079,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0MjMwMDc5","html_url":"https://github.com/zcash/zcash/pull/3422","diff_url":"https://github.com/zcash/zcash/pull/3422.diff","patch_url":"https://github.com/zcash/zcash/pull/3422.patch","issue_url":"https://api.github.com/repos/zcash/zcash/issues/3422","number":3422,"state":"open","locked":false,"title":"[WIP] 3061 track notes based on 3062","user":{"login":"bitcartel","id":194979,"node_id":"MDQ6VXNlcjE5NDk3OQ==","avatar_url":"https://avatars2.githubusercontent.com/u/194979?v=4","gravatar_id":"","url":"https://api.github.com/users/bitcartel","html_url":"https://github.com/bitcartel","followers_url":"https://api.github.com/users/bitcartel/followers","following_url":"https://api.github.com/users/bitcartel/following{/other_user}","gists_url":"https://api.github.com/users/bitcartel/gists{/gist_id}","starred_url":"https://api.github.com/users/bitcartel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitcartel/subscriptions","organizations_url":"https://api.github.com/users/bitcartel/orgs","repos_url":"https://api.github.com/users/bitcartel/repos","events_url":"https://api.github.com/users/bitcartel/events{/privacy}","received_events_url":"https://api.github.com/users/bitcartel/received_events","type":"User","site_admin":false},"body":"Ready for review and comments.  Tests are being written right now.","created_at":"2018-07-26T18:35:31Z","updated_at":"2018-08-03T02:32:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0d27f9b2e3aa66082714cb20973e35bde3c6730f","assignee":null,"assignees":[],"requested_reviewers":[{"login":"ebfull","id":3794471,"node_id":"MDQ6VXNlcjM3OTQ0NzE=","avatar_url":"https://avatars1.githubusercontent.com/u/3794471?v=4","gravatar_id":"","url":"https://api.github.com/users/ebfull","html_url":"https://github.com/ebfull","followers_url":"https://api.github.com/users/ebfull/followers","following_url":"https://api.github.com/users/ebfull/following{/other_user}","gists_url":"https://api.github.com/users/ebfull/gists{/gist_id}","starred_url":"https://api.github.com/users/ebfull/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebfull/subscriptions","organizations_url":"https://api.github.com/users/ebfull/orgs","repos_url":"https://api.github.com/users/ebfull/repos","events_url":"https://api.github.com/users/ebfull/events{/privacy}","received_events_url":"https://api.github.com/users/ebfull/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":546339364,"node_id":"MDU6TGFiZWw1NDYzMzkzNjQ=","url":"https://api.github.com/repos/zcash/zcash/labels/Sapling","name":"Sapling","color":"0e8a16","default":false},{"id":156615475,"node_id":"MDU6TGFiZWwxNTY2MTU0NzU=","url":"https://api.github.com/repos/zcash/zcash/labels/wallet","name":"wallet","color":"006b75","default":false}],"milestone":{"url":"https://api.github.com/repos/zcash/zcash/milestones/73","html_url":"https://github.com/zcash/zcash/milestone/73","labels_url":"https://api.github.com/repos/zcash/zcash/milestones/73/labels","id":3126623,"node_id":"MDk6TWlsZXN0b25lMzEyNjYyMw==","number":73,"title":"v2.0.0","description":"First Sapling-compatible release, containing the main-net activation height.","creator":{"login":"str4d","id":4993799,"node_id":"MDQ6VXNlcjQ5OTM3OTk=","avatar_url":"https://avatars0.githubusercontent.com/u/4993799?v=4","gravatar_id":"","url":"https://api.github.com/users/str4d","html_url":"https://github.com/str4d","followers_url":"https://api.github.com/users/str4d/followers","following_url":"https://api.github.com/users/str4d/following{/other_user}","gists_url":"https://api.github.com/users/str4d/gists{/gist_id}","starred_url":"https://api.github.com/users/str4d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/str4d/subscriptions","organizations_url":"https://api.github.com/users/str4d/orgs","repos_url":"https://api.github.com/users/str4d/repos","events_url":"https://api.github.com/users/str4d/events{/privacy}","received_events_url":"https://api.github.com/users/str4d/received_events","type":"User","site_admin":false},"open_issues":36,"closed_issues":41,"state":"open","created_at":"2018-02-19T11:41:00Z","updated_at":"2018-08-02T23:52:47Z","due_on":"2018-08-13T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/zcash/zcash/pulls/3422/commits","review_comments_url":"https://api.github.com/repos/zcash/zcash/pulls/3422/comments","review_comment_url":"https://api.github.com/repos/zcash/zcash/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zcash/zcash/issues/3422/comments","statuses_url":"https://api.github.com/repos/zcash/zcash/statuses/0eb8d34d92282204a8e000808c837e165d228601","head":{"label":"bitcartel:3061_track_notes_based_on_3062","ref":"3061_track_notes_based_on_3062","sha":"0eb8d34d92282204a8e000808c837e165d228601","user":{"login":"bitcartel","id":194979,"node_id":"MDQ6VXNlcjE5NDk3OQ==","avatar_url":"https://avatars2.githubusercontent.com/u/194979?v=4","gravatar_id":"","url":"https://api.github.com/users/bitcartel","html_url":"https://github.com/bitcartel","followers_url":"https://api.github.com/users/bitcartel/followers","following_url":"https://api.github.com/users/bitcartel/following{/other_user}","gists_url":"https://api.github.com/users/bitcartel/gists{/gist_id}","starred_url":"https://api.github.com/users/bitcartel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitcartel/subscriptions","organizations_url":"https://api.github.com/users/bitcartel/orgs","repos_url":"https://api.github.com/users/bitcartel/repos","events_url":"https://api.github.com/users/bitcartel/events{/privacy}","received_events_url":"https://api.github.com/users/bitcartel/received_events","type":"User","site_admin":false},"repo":{"id":58775418,"node_id":"MDEwOlJlcG9zaXRvcnk1ODc3NTQxOA==","name":"zcash","full_name":"bitcartel/zcash","owner":{"login":"bitcartel","id":194979,"node_id":"MDQ6VXNlcjE5NDk3OQ==","avatar_url":"https://avatars2.githubusercontent.com/u/194979?v=4","gravatar_id":"","url":"https://api.github.com/users/bitcartel","html_url":"https://github.com/bitcartel","followers_url":"https://api.github.com/users/bitcartel/followers","following_url":"https://api.github.com/users/bitcartel/following{/other_user}","gists_url":"https://api.github.com/users/bitcartel/gists{/gist_id}","starred_url":"https://api.github.com/users/bitcartel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitcartel/subscriptions","organizations_url":"https://api.github.com/users/bitcartel/orgs","repos_url":"https://api.github.com/users/bitcartel/repos","events_url":"https://api.github.com/users/bitcartel/events{/privacy}","received_events_url":"https://api.github.com/users/bitcartel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bitcartel/zcash","description":"zcash","fork":true,"url":"https://api.github.com/repos/bitcartel/zcash","forks_url":"https://api.github.com/repos/bitcartel/zcash/forks","keys_url":"https://api.github.com/repos/bitcartel/zcash/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bitcartel/zcash/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bitcartel/zcash/teams","hooks_url":"https://api.github.com/repos/bitcartel/zcash/hooks","issue_events_url":"https://api.github.com/repos/bitcartel/zcash/issues/events{/number}","events_url":"https://api.github.com/repos/bitcartel/zcash/events","assignees_url":"https://api.github.com/repos/bitcartel/zcash/assignees{/user}","branches_url":"https://api.github.com/repos/bitcartel/zcash/branches{/branch}","tags_url":"https://api.github.com/repos/bitcartel/zcash/tags","blobs_url":"https://api.github.com/repos/bitcartel/zcash/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bitcartel/zcash/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bitcartel/zcash/git/refs{/sha}","trees_url":"https://api.github.com/repos/bitcartel/zcash/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bitcartel/zcash/statuses/{sha}","languages_url":"https://api.github.com/repos/bitcartel/zcash/languages","stargazers_url":"https://api.github.com/repos/bitcartel/zcash/stargazers","contributors_url":"https://api.github.com/repos/bitcartel/zcash/contributors","subscribers_url":"https://api.github.com/repos/bitcartel/zcash/subscribers","subscription_url":"https://api.github.com/repos/bitcartel/zcash/subscription","commits_url":"https://api.github.com/repos/bitcartel/zcash/commits{/sha}","git_commits_url":"https://api.github.com/repos/bitcartel/zcash/git/commits{/sha}","comments_url":"https://api.github.com/repos/bitcartel/zcash/comments{/number}","issue_comment_url":"https://api.github.com/repos/bitcartel/zcash/issues/comments{/number}","contents_url":"https://api.github.com/repos/bitcartel/zcash/contents/{+path}","compare_url":"https://api.github.com/repos/bitcartel/zcash/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bitcartel/zcash/merges","archive_url":"https://api.github.com/repos/bitcartel/zcash/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bitcartel/zcash/downloads","issues_url":"https://api.github.com/repos/bitcartel/zcash/issues{/number}","pulls_url":"https://api.github.com/repos/bitcartel/zcash/pulls{/number}","milestones_url":"https://api.github.com/repos/bitcartel/zcash/milestones{/number}","notifications_url":"https://api.github.com/repos/bitcartel/zcash/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bitcartel/zcash/labels{/name}","releases_url":"https://api.github.com/repos/bitcartel/zcash/releases{/id}","deployments_url":"https://api.github.com/repos/bitcartel/zcash/deployments","created_at":"2016-05-13T22:11:54Z","updated_at":"2017-03-07T02:42:49Z","pushed_at":"2018-08-03T02:13:41Z","git_url":"git://github.com/bitcartel/zcash.git","ssh_url":"git@github.com:bitcartel/zcash.git","clone_url":"https://github.com/bitcartel/zcash.git","svn_url":"https://github.com/bitcartel/zcash","homepage":"https://z.cash/","size":58389,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":0,"watchers":1,"default_branch":"zc.v0.11.2.latest"}},"base":{"label":"zcash:master","ref":"master","sha":"871e1726c6d8ebb940f0a51260a00aea0a496bce","user":{"login":"zcash","id":16122764,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MTIyNzY0","avatar_url":"https://avatars2.githubusercontent.com/u/16122764?v=4","gravatar_id":"","url":"https://api.github.com/users/zcash","html_url":"https://github.com/zcash","followers_url":"https://api.github.com/users/zcash/followers","following_url":"https://api.github.com/users/zcash/following{/other_user}","gists_url":"https://api.github.com/users/zcash/gists{/gist_id}","starred_url":"https://api.github.com/users/zcash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zcash/subscriptions","organizations_url":"https://api.github.com/users/zcash/orgs","repos_url":"https://api.github.com/users/zcash/repos","events_url":"https://api.github.com/users/zcash/events{/privacy}","received_events_url":"https://api.github.com/users/zcash/received_events","type":"Organization","site_admin":false},"repo":{"id":26987049,"node_id":"MDEwOlJlcG9zaXRvcnkyNjk4NzA0OQ==","name":"zcash","full_name":"zcash/zcash","owner":{"login":"zcash","id":16122764,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MTIyNzY0","avatar_url":"https://avatars2.githubusercontent.com/u/16122764?v=4","gravatar_id":"","url":"https://api.github.com/users/zcash","html_url":"https://github.com/zcash","followers_url":"https://api.github.com/users/zcash/followers","following_url":"https://api.github.com/users/zcash/following{/other_user}","gists_url":"https://api.github.com/users/zcash/gists{/gist_id}","starred_url":"https://api.github.com/users/zcash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zcash/subscriptions","organizations_url":"https://api.github.com/users/zcash/orgs","repos_url":"https://api.github.com/users/zcash/repos","events_url":"https://api.github.com/users/zcash/events{/privacy}","received_events_url":"https://api.github.com/users/zcash/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zcash/zcash","description":"Zcash - Internet Money","fork":false,"url":"https://api.github.com/repos/zcash/zcash","forks_url":"https://api.github.com/repos/zcash/zcash/forks","keys_url":"https://api.github.com/repos/zcash/zcash/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zcash/zcash/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zcash/zcash/teams","hooks_url":"https://api.github.com/repos/zcash/zcash/hooks","issue_events_url":"https://api.github.com/repos/zcash/zcash/issues/events{/number}","events_url":"https://api.github.com/repos/zcash/zcash/events","assignees_url":"https://api.github.com/repos/zcash/zcash/assignees{/user}","branches_url":"https://api.github.com/repos/zcash/zcash/branches{/branch}","tags_url":"https://api.github.com/repos/zcash/zcash/tags","blobs_url":"https://api.github.com/repos/zcash/zcash/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zcash/zcash/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zcash/zcash/git/refs{/sha}","trees_url":"https://api.github.com/repos/zcash/zcash/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zcash/zcash/statuses/{sha}","languages_url":"https://api.github.com/repos/zcash/zcash/languages","stargazers_url":"https://api.github.com/repos/zcash/zcash/stargazers","contributors_url":"https://api.github.com/repos/zcash/zcash/contributors","subscribers_url":"https://api.github.com/repos/zcash/zcash/subscribers","subscription_url":"https://api.github.com/repos/zcash/zcash/subscription","commits_url":"https://api.github.com/repos/zcash/zcash/commits{/sha}","git_commits_url":"https://api.github.com/repos/zcash/zcash/git/commits{/sha}","comments_url":"https://api.github.com/repos/zcash/zcash/comments{/number}","issue_comment_url":"https://api.github.com/repos/zcash/zcash/issues/comments{/number}","contents_url":"https://api.github.com/repos/zcash/zcash/contents/{+path}","compare_url":"https://api.github.com/repos/zcash/zcash/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zcash/zcash/merges","archive_url":"https://api.github.com/repos/zcash/zcash/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zcash/zcash/downloads","issues_url":"https://api.github.com/repos/zcash/zcash/issues{/number}","pulls_url":"https://api.github.com/repos/zcash/zcash/pulls{/number}","milestones_url":"https://api.github.com/repos/zcash/zcash/milestones{/number}","notifications_url":"https://api.github.com/repos/zcash/zcash/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zcash/zcash/labels{/name}","releases_url":"https://api.github.com/repos/zcash/zcash/releases{/id}","deployments_url":"https://api.github.com/repos/zcash/zcash/deployments","created_at":"2014-11-22T03:13:10Z","updated_at":"2018-08-03T01:19:03Z","pushed_at":"2018-08-03T02:13:43Z","git_url":"git://github.com/zcash/zcash.git","ssh_url":"git@github.com:zcash/zcash.git","clone_url":"https://github.com/zcash/zcash.git","svn_url":"https://github.com/zcash/zcash","homepage":"https://z.cash/","size":64123,"stargazers_count":3774,"watchers_count":3774,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1280,"mirror_url":null,"archived":false,"open_issues_count":809,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":1280,"open_issues":809,"watchers":3774,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zcash/zcash/pulls/3422"},"html":{"href":"https://github.com/zcash/zcash/pull/3422"},"issue":{"href":"https://api.github.com/repos/zcash/zcash/issues/3422"},"comments":{"href":"https://api.github.com/repos/zcash/zcash/issues/3422/comments"},"review_comments":{"href":"https://api.github.com/repos/zcash/zcash/pulls/3422/comments"},"review_comment":{"href":"https://api.github.com/repos/zcash/zcash/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zcash/zcash/pulls/3422/commits"},"statuses":{"href":"https://api.github.com/repos/zcash/zcash/statuses/0eb8d34d92282204a8e000808c837e165d228601"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"str4d"}}