{"action":"created","comment":{"url":"https://api.github.com/repos/lightningnetwork/lnd/pulls/comments/173120788","pull_request_review_id":102251157,"id":173120788,"diff_hunk":"@@ -77,6 +77,23 @@ type reservationWithCtx struct {\n \terr     chan error\n }\n \n+// isLocked checks the reservation's timestamp to determine whether it is locked.\n+// The time zero value represents a locked reservation\n+func (r *reservationWithCtx) isLocked() bool {\n+\treturn r.lastUpdated.IsZero()\n+}\n+\n+// lock locks the reservation from zombie pruning by setting its timestamp to the\n+// zero value","path":"fundingmanager.go","position":17,"original_position":11,"commit_id":"aac52d38f5e0dd8fdafe22a1632ad6dea3d14417","original_commit_id":"aac52d38f5e0dd8fdafe22a1632ad6dea3d14417","user":{"login":"halseth","id":3765732,"avatar_url":"https://avatars1.githubusercontent.com/u/3765732?v=4","gravatar_id":"","url":"https://api.github.com/users/halseth","html_url":"https://github.com/halseth","followers_url":"https://api.github.com/users/halseth/followers","following_url":"https://api.github.com/users/halseth/following{/other_user}","gists_url":"https://api.github.com/users/halseth/gists{/gist_id}","starred_url":"https://api.github.com/users/halseth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/halseth/subscriptions","organizations_url":"https://api.github.com/users/halseth/orgs","repos_url":"https://api.github.com/users/halseth/repos","events_url":"https://api.github.com/users/halseth/events{/privacy}","received_events_url":"https://api.github.com/users/halseth/received_events","type":"User","site_admin":false},"body":"nit: period.","created_at":"2018-03-08T10:35:49Z","updated_at":"2018-03-08T10:37:01Z","html_url":"https://github.com/lightningnetwork/lnd/pull/782#discussion_r173120788","pull_request_url":"https://api.github.com/repos/lightningnetwork/lnd/pulls/782","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/lightningnetwork/lnd/pulls/comments/173120788"},"html":{"href":"https://github.com/lightningnetwork/lnd/pull/782#discussion_r173120788"},"pull_request":{"href":"https://api.github.com/repos/lightningnetwork/lnd/pulls/782"}}},"pull_request":{"url":"https://api.github.com/repos/lightningnetwork/lnd/pulls/782","id":171277732,"html_url":"https://github.com/lightningnetwork/lnd/pull/782","diff_url":"https://github.com/lightningnetwork/lnd/pull/782.diff","patch_url":"https://github.com/lightningnetwork/lnd/pull/782.patch","issue_url":"https://api.github.com/repos/lightningnetwork/lnd/issues/782","number":782,"state":"open","locked":false,"title":"funding: implement reservation zombie sweeper","user":{"login":"paddyquinn","id":9949229,"avatar_url":"https://avatars0.githubusercontent.com/u/9949229?v=4","gravatar_id":"","url":"https://api.github.com/users/paddyquinn","html_url":"https://github.com/paddyquinn","followers_url":"https://api.github.com/users/paddyquinn/followers","following_url":"https://api.github.com/users/paddyquinn/following{/other_user}","gists_url":"https://api.github.com/users/paddyquinn/gists{/gist_id}","starred_url":"https://api.github.com/users/paddyquinn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paddyquinn/subscriptions","organizations_url":"https://api.github.com/users/paddyquinn/orgs","repos_url":"https://api.github.com/users/paddyquinn/repos","events_url":"https://api.github.com/users/paddyquinn/events{/privacy}","received_events_url":"https://api.github.com/users/paddyquinn/received_events","type":"User","site_admin":false},"body":"In this PR, a timeout is added to each `ChannelReservation`, which cancels the reservation when reached. On each successive message in the `ChannelReservation` workflow the timeout is reset, so that timeouts only occur after an idle period in the workflow.\r\n\r\nThis PR takes care of #60. Instead of creating a goroutine that periodically sweeps any zombie reservations, this PR adds a timer to each reservation, which cancels the reservation when it expires. In that way, a zombie reservation will be cleaned up (and thus resources freed up) as soon as possible.","created_at":"2018-02-26T03:59:16Z","updated_at":"2018-03-08T10:37:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"44d041d26cc4a7a69d356fc9a6627905e9cadea0","assignee":{"login":"halseth","id":3765732,"avatar_url":"https://avatars1.githubusercontent.com/u/3765732?v=4","gravatar_id":"","url":"https://api.github.com/users/halseth","html_url":"https://github.com/halseth","followers_url":"https://api.github.com/users/halseth/followers","following_url":"https://api.github.com/users/halseth/following{/other_user}","gists_url":"https://api.github.com/users/halseth/gists{/gist_id}","starred_url":"https://api.github.com/users/halseth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/halseth/subscriptions","organizations_url":"https://api.github.com/users/halseth/orgs","repos_url":"https://api.github.com/users/halseth/repos","events_url":"https://api.github.com/users/halseth/events{/privacy}","received_events_url":"https://api.github.com/users/halseth/received_events","type":"User","site_admin":false},"assignees":[{"login":"halseth","id":3765732,"avatar_url":"https://avatars1.githubusercontent.com/u/3765732?v=4","gravatar_id":"","url":"https://api.github.com/users/halseth","html_url":"https://github.com/halseth","followers_url":"https://api.github.com/users/halseth/followers","following_url":"https://api.github.com/users/halseth/following{/other_user}","gists_url":"https://api.github.com/users/halseth/gists{/gist_id}","starred_url":"https://api.github.com/users/halseth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/halseth/subscriptions","organizations_url":"https://api.github.com/users/halseth/orgs","repos_url":"https://api.github.com/users/halseth/repos","events_url":"https://api.github.com/users/halseth/events{/privacy}","received_events_url":"https://api.github.com/users/halseth/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":431221659,"url":"https://api.github.com/repos/lightningnetwork/lnd/labels/wallet","name":"wallet","color":"5319e7","default":false}],"milestone":{"url":"https://api.github.com/repos/lightningnetwork/lnd/milestones/5","html_url":"https://github.com/lightningnetwork/lnd/milestone/5","labels_url":"https://api.github.com/repos/lightningnetwork/lnd/milestones/5/labels","id":2725537,"number":5,"title":"v0.4-beta","description":"","creator":{"login":"Roasbeef","id":998190,"avatar_url":"https://avatars3.githubusercontent.com/u/998190?v=4","gravatar_id":"","url":"https://api.github.com/users/Roasbeef","html_url":"https://github.com/Roasbeef","followers_url":"https://api.github.com/users/Roasbeef/followers","following_url":"https://api.github.com/users/Roasbeef/following{/other_user}","gists_url":"https://api.github.com/users/Roasbeef/gists{/gist_id}","starred_url":"https://api.github.com/users/Roasbeef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Roasbeef/subscriptions","organizations_url":"https://api.github.com/users/Roasbeef/orgs","repos_url":"https://api.github.com/users/Roasbeef/repos","events_url":"https://api.github.com/users/Roasbeef/events{/privacy}","received_events_url":"https://api.github.com/users/Roasbeef/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":19,"state":"open","created_at":"2017-08-27T22:11:13Z","updated_at":"2018-03-06T22:21:56Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/lightningnetwork/lnd/pulls/782/commits","review_comments_url":"https://api.github.com/repos/lightningnetwork/lnd/pulls/782/comments","review_comment_url":"https://api.github.com/repos/lightningnetwork/lnd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lightningnetwork/lnd/issues/782/comments","statuses_url":"https://api.github.com/repos/lightningnetwork/lnd/statuses/aac52d38f5e0dd8fdafe22a1632ad6dea3d14417","head":{"label":"paddyquinn:master","ref":"master","sha":"aac52d38f5e0dd8fdafe22a1632ad6dea3d14417","user":{"login":"paddyquinn","id":9949229,"avatar_url":"https://avatars0.githubusercontent.com/u/9949229?v=4","gravatar_id":"","url":"https://api.github.com/users/paddyquinn","html_url":"https://github.com/paddyquinn","followers_url":"https://api.github.com/users/paddyquinn/followers","following_url":"https://api.github.com/users/paddyquinn/following{/other_user}","gists_url":"https://api.github.com/users/paddyquinn/gists{/gist_id}","starred_url":"https://api.github.com/users/paddyquinn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paddyquinn/subscriptions","organizations_url":"https://api.github.com/users/paddyquinn/orgs","repos_url":"https://api.github.com/users/paddyquinn/repos","events_url":"https://api.github.com/users/paddyquinn/events{/privacy}","received_events_url":"https://api.github.com/users/paddyquinn/received_events","type":"User","site_admin":false},"repo":{"id":122150656,"name":"lnd","full_name":"paddyquinn/lnd","owner":{"login":"paddyquinn","id":9949229,"avatar_url":"https://avatars0.githubusercontent.com/u/9949229?v=4","gravatar_id":"","url":"https://api.github.com/users/paddyquinn","html_url":"https://github.com/paddyquinn","followers_url":"https://api.github.com/users/paddyquinn/followers","following_url":"https://api.github.com/users/paddyquinn/following{/other_user}","gists_url":"https://api.github.com/users/paddyquinn/gists{/gist_id}","starred_url":"https://api.github.com/users/paddyquinn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paddyquinn/subscriptions","organizations_url":"https://api.github.com/users/paddyquinn/orgs","repos_url":"https://api.github.com/users/paddyquinn/repos","events_url":"https://api.github.com/users/paddyquinn/events{/privacy}","received_events_url":"https://api.github.com/users/paddyquinn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/paddyquinn/lnd","description":"Lightning Network Daemon ⚡️","fork":true,"url":"https://api.github.com/repos/paddyquinn/lnd","forks_url":"https://api.github.com/repos/paddyquinn/lnd/forks","keys_url":"https://api.github.com/repos/paddyquinn/lnd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/paddyquinn/lnd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/paddyquinn/lnd/teams","hooks_url":"https://api.github.com/repos/paddyquinn/lnd/hooks","issue_events_url":"https://api.github.com/repos/paddyquinn/lnd/issues/events{/number}","events_url":"https://api.github.com/repos/paddyquinn/lnd/events","assignees_url":"https://api.github.com/repos/paddyquinn/lnd/assignees{/user}","branches_url":"https://api.github.com/repos/paddyquinn/lnd/branches{/branch}","tags_url":"https://api.github.com/repos/paddyquinn/lnd/tags","blobs_url":"https://api.github.com/repos/paddyquinn/lnd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/paddyquinn/lnd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/paddyquinn/lnd/git/refs{/sha}","trees_url":"https://api.github.com/repos/paddyquinn/lnd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/paddyquinn/lnd/statuses/{sha}","languages_url":"https://api.github.com/repos/paddyquinn/lnd/languages","stargazers_url":"https://api.github.com/repos/paddyquinn/lnd/stargazers","contributors_url":"https://api.github.com/repos/paddyquinn/lnd/contributors","subscribers_url":"https://api.github.com/repos/paddyquinn/lnd/subscribers","subscription_url":"https://api.github.com/repos/paddyquinn/lnd/subscription","commits_url":"https://api.github.com/repos/paddyquinn/lnd/commits{/sha}","git_commits_url":"https://api.github.com/repos/paddyquinn/lnd/git/commits{/sha}","comments_url":"https://api.github.com/repos/paddyquinn/lnd/comments{/number}","issue_comment_url":"https://api.github.com/repos/paddyquinn/lnd/issues/comments{/number}","contents_url":"https://api.github.com/repos/paddyquinn/lnd/contents/{+path}","compare_url":"https://api.github.com/repos/paddyquinn/lnd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/paddyquinn/lnd/merges","archive_url":"https://api.github.com/repos/paddyquinn/lnd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/paddyquinn/lnd/downloads","issues_url":"https://api.github.com/repos/paddyquinn/lnd/issues{/number}","pulls_url":"https://api.github.com/repos/paddyquinn/lnd/pulls{/number}","milestones_url":"https://api.github.com/repos/paddyquinn/lnd/milestones{/number}","notifications_url":"https://api.github.com/repos/paddyquinn/lnd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/paddyquinn/lnd/labels{/name}","releases_url":"https://api.github.com/repos/paddyquinn/lnd/releases{/id}","deployments_url":"https://api.github.com/repos/paddyquinn/lnd/deployments","created_at":"2018-02-20T03:24:30Z","updated_at":"2018-02-20T03:24:32Z","pushed_at":"2018-03-08T00:50:31Z","git_url":"git://github.com/paddyquinn/lnd.git","ssh_url":"git@github.com:paddyquinn/lnd.git","clone_url":"https://github.com/paddyquinn/lnd.git","svn_url":"https://github.com/paddyquinn/lnd","homepage":"","size":12063,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"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"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"lightningnetwork:master","ref":"master","sha":"116406c7ec11672542005727ceb055e4177fc6a4","user":{"login":"lightningnetwork","id":13424735,"avatar_url":"https://avatars0.githubusercontent.com/u/13424735?v=4","gravatar_id":"","url":"https://api.github.com/users/lightningnetwork","html_url":"https://github.com/lightningnetwork","followers_url":"https://api.github.com/users/lightningnetwork/followers","following_url":"https://api.github.com/users/lightningnetwork/following{/other_user}","gists_url":"https://api.github.com/users/lightningnetwork/gists{/gist_id}","starred_url":"https://api.github.com/users/lightningnetwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lightningnetwork/subscriptions","organizations_url":"https://api.github.com/users/lightningnetwork/orgs","repos_url":"https://api.github.com/users/lightningnetwork/repos","events_url":"https://api.github.com/users/lightningnetwork/events{/privacy}","received_events_url":"https://api.github.com/users/lightningnetwork/received_events","type":"Organization","site_admin":false},"repo":{"id":49765480,"name":"lnd","full_name":"lightningnetwork/lnd","owner":{"login":"lightningnetwork","id":13424735,"avatar_url":"https://avatars0.githubusercontent.com/u/13424735?v=4","gravatar_id":"","url":"https://api.github.com/users/lightningnetwork","html_url":"https://github.com/lightningnetwork","followers_url":"https://api.github.com/users/lightningnetwork/followers","following_url":"https://api.github.com/users/lightningnetwork/following{/other_user}","gists_url":"https://api.github.com/users/lightningnetwork/gists{/gist_id}","starred_url":"https://api.github.com/users/lightningnetwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lightningnetwork/subscriptions","organizations_url":"https://api.github.com/users/lightningnetwork/orgs","repos_url":"https://api.github.com/users/lightningnetwork/repos","events_url":"https://api.github.com/users/lightningnetwork/events{/privacy}","received_events_url":"https://api.github.com/users/lightningnetwork/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lightningnetwork/lnd","description":"Lightning Network Daemon ⚡️","fork":false,"url":"https://api.github.com/repos/lightningnetwork/lnd","forks_url":"https://api.github.com/repos/lightningnetwork/lnd/forks","keys_url":"https://api.github.com/repos/lightningnetwork/lnd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lightningnetwork/lnd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lightningnetwork/lnd/teams","hooks_url":"https://api.github.com/repos/lightningnetwork/lnd/hooks","issue_events_url":"https://api.github.com/repos/lightningnetwork/lnd/issues/events{/number}","events_url":"https://api.github.com/repos/lightningnetwork/lnd/events","assignees_url":"https://api.github.com/repos/lightningnetwork/lnd/assignees{/user}","branches_url":"https://api.github.com/repos/lightningnetwork/lnd/branches{/branch}","tags_url":"https://api.github.com/repos/lightningnetwork/lnd/tags","blobs_url":"https://api.github.com/repos/lightningnetwork/lnd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lightningnetwork/lnd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lightningnetwork/lnd/git/refs{/sha}","trees_url":"https://api.github.com/repos/lightningnetwork/lnd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lightningnetwork/lnd/statuses/{sha}","languages_url":"https://api.github.com/repos/lightningnetwork/lnd/languages","stargazers_url":"https://api.github.com/repos/lightningnetwork/lnd/stargazers","contributors_url":"https://api.github.com/repos/lightningnetwork/lnd/contributors","subscribers_url":"https://api.github.com/repos/lightningnetwork/lnd/subscribers","subscription_url":"https://api.github.com/repos/lightningnetwork/lnd/subscription","commits_url":"https://api.github.com/repos/lightningnetwork/lnd/commits{/sha}","git_commits_url":"https://api.github.com/repos/lightningnetwork/lnd/git/commits{/sha}","comments_url":"https://api.github.com/repos/lightningnetwork/lnd/comments{/number}","issue_comment_url":"https://api.github.com/repos/lightningnetwork/lnd/issues/comments{/number}","contents_url":"https://api.github.com/repos/lightningnetwork/lnd/contents/{+path}","compare_url":"https://api.github.com/repos/lightningnetwork/lnd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lightningnetwork/lnd/merges","archive_url":"https://api.github.com/repos/lightningnetwork/lnd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lightningnetwork/lnd/downloads","issues_url":"https://api.github.com/repos/lightningnetwork/lnd/issues{/number}","pulls_url":"https://api.github.com/repos/lightningnetwork/lnd/pulls{/number}","milestones_url":"https://api.github.com/repos/lightningnetwork/lnd/milestones{/number}","notifications_url":"https://api.github.com/repos/lightningnetwork/lnd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lightningnetwork/lnd/labels{/name}","releases_url":"https://api.github.com/repos/lightningnetwork/lnd/releases{/id}","deployments_url":"https://api.github.com/repos/lightningnetwork/lnd/deployments","created_at":"2016-01-16T08:19:33Z","updated_at":"2018-03-08T09:20:53Z","pushed_at":"2018-03-08T09:28:35Z","git_url":"git://github.com/lightningnetwork/lnd.git","ssh_url":"git@github.com:lightningnetwork/lnd.git","clone_url":"https://github.com/lightningnetwork/lnd.git","svn_url":"https://github.com/lightningnetwork/lnd","homepage":"","size":11997,"stargazers_count":2094,"watchers_count":2094,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":437,"mirror_url":null,"archived":false,"open_issues_count":126,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":437,"open_issues":126,"watchers":2094,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lightningnetwork/lnd/pulls/782"},"html":{"href":"https://github.com/lightningnetwork/lnd/pull/782"},"issue":{"href":"https://api.github.com/repos/lightningnetwork/lnd/issues/782"},"comments":{"href":"https://api.github.com/repos/lightningnetwork/lnd/issues/782/comments"},"review_comments":{"href":"https://api.github.com/repos/lightningnetwork/lnd/pulls/782/comments"},"review_comment":{"href":"https://api.github.com/repos/lightningnetwork/lnd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lightningnetwork/lnd/pulls/782/commits"},"statuses":{"href":"https://api.github.com/repos/lightningnetwork/lnd/statuses/aac52d38f5e0dd8fdafe22a1632ad6dea3d14417"}},"author_association":"NONE"}}
{"actor":{"display_login":"halseth"}}