{"action":"created","issue":{"url":"https://api.github.com/repos/lightningnetwork/lnd/issues/1248","repository_url":"https://api.github.com/repos/lightningnetwork/lnd","labels_url":"https://api.github.com/repos/lightningnetwork/lnd/issues/1248/labels{/name}","comments_url":"https://api.github.com/repos/lightningnetwork/lnd/issues/1248/comments","events_url":"https://api.github.com/repos/lightningnetwork/lnd/issues/1248/events","html_url":"https://github.com/lightningnetwork/lnd/pull/1248","id":323229636,"number":1248,"title":"[bugfix] Wait for confirmation before marking channel cooperatively closed","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},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-05-15T13:56:40Z","updated_at":"2018-05-23T22:25:54Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/lightningnetwork/lnd/pulls/1248","html_url":"https://github.com/lightningnetwork/lnd/pull/1248","diff_url":"https://github.com/lightningnetwork/lnd/pull/1248.diff","patch_url":"https://github.com/lightningnetwork/lnd/pull/1248.patch"},"body":"This PR fixes an issue where we could go through a cooperative close, and marking the channel as closed in the DB before it was confirmed. This would lead to potential issues as we wouldn't start the necessary submodules to watch for the final close on restarts. \r\n\r\nIn #1017 we changed the definition of a closed channel to be a channel that has had its closing tx confirmed. This PR makes this true also for cooperative closes."},"comment":{"url":"https://api.github.com/repos/lightningnetwork/lnd/issues/comments/391516716","html_url":"https://github.com/lightningnetwork/lnd/pull/1248#issuecomment-391516716","issue_url":"https://api.github.com/repos/lightningnetwork/lnd/issues/1248","id":391516716,"user":{"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},"created_at":"2018-05-23T22:25:54Z","updated_at":"2018-05-23T22:25:54Z","author_association":"MEMBER","body":"> Since we are only fetching channels from the open chan bucket when starting the proper chain watchers, we would be blind to an unexpected commitment getting confirmed.\r\n\r\nAhh, I see what you're saying: although we _expect_ a co-op close transaction to land in the chain, it may be the case that a force close transaction actually does instead. We look in the pending channel bucket (not the open channel bucket), so we would create an arbitrator in this limited form, but if a user attempted to force close _again_, then a panic would occur as the pointer wasn't set. "}}
{"actor":{"display_login":"Roasbeef"}}