{"action":"created","comment":{"url":"https://api.github.com/repos/aeternity/epoch/pulls/comments/218461197","pull_request_review_id":156404318,"id":218461197,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxODQ2MTE5Nw==","diff_hunk":"@@ -1301,7 +1231,46 @@ handle_call_(_St, _Req, From, D) ->\n \n handle_info(Msg, #data{cur_statem_state = St} = D) ->\n     lager:debug(\"Discarding info in ~p state: ~p\", [St, Msg]),\n-    keep_state(D).\n+    keep_state(log(drop, msg_type(Msg), Msg, D)).\n+\n+handle_common_event(E, Msg, M, #data{cur_statem_state = St} = D) ->\n+    lager:debug(\"handle_common_event(~p, ~p, ~p, ~p, D)\", [E, Msg, St, M]),\n+    handle_common_event_(E, Msg, St, M, D).\n+\n+handle_common_event_(timeout, St = T, St, _, D) ->\n+    close({timeout, T}, D);\n+handle_common_event_(cast, {?DISCONNECT, _}, _St, _, D) ->\n+    close(disconnect, D);\n+handle_common_event_(cast, {?CHANNEL_CLOSING, ChanId} = Msg, _St, _,\n+                     #data{on_chain_id = ChanId} = D) ->\n+    lager:debug(\"got ~p\", [Msg]),\n+    close(channel_closing_on_chain, D);\n+handle_common_event_({call, From}, Req, St, Mode, D) ->\n+    case Mode of\n+        error_all ->\n+            keep_state(D, [{reply, From, {error, not_ready}}]);\n+        _ ->\n+            handle_call(St, Req, From, D)\n+    end;\n+handle_common_event_(_Type, {_, _} = _Msg, _St, P, D) when P == postpone ->\n+    postpone(D);\n+handle_common_event_(info, Msg, _St, _P, D) ->\n+    handle_info(Msg, D);\n+handle_common_event_(Type, Msg, St, discard, D) ->\n+    lager:error(\"Discarding ~p in '~p' state: ~p\", [Type, St, Msg]),\n+    keep_state(log(drop, msg_type(Msg), Msg, D));\n+handle_common_event_(Type, Msg, St, error, D) ->","path":"apps/aechannel/src/aesc_fsm.erl","position":412,"original_position":412,"commit_id":"a5fb80bf3a21f368f5c2a7ff25889146d32170ec","original_commit_id":"a5fb80bf3a21f368f5c2a7ff25889146d32170ec","user":{"login":"uwiger","id":160216,"node_id":"MDQ6VXNlcjE2MDIxNg==","avatar_url":"https://avatars3.githubusercontent.com/u/160216?v=4","gravatar_id":"","url":"https://api.github.com/users/uwiger","html_url":"https://github.com/uwiger","followers_url":"https://api.github.com/users/uwiger/followers","following_url":"https://api.github.com/users/uwiger/following{/other_user}","gists_url":"https://api.github.com/users/uwiger/gists{/gist_id}","starred_url":"https://api.github.com/users/uwiger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uwiger/subscriptions","organizations_url":"https://api.github.com/users/uwiger/orgs","repos_url":"https://api.github.com/users/uwiger/repos","events_url":"https://api.github.com/users/uwiger/events{/privacy}","received_events_url":"https://api.github.com/users/uwiger/received_events","type":"User","site_admin":false},"body":"Will fix.","created_at":"2018-09-18T14:41:35Z","updated_at":"2018-09-18T14:41:36Z","html_url":"https://github.com/aeternity/epoch/pull/1553#discussion_r218461197","pull_request_url":"https://api.github.com/repos/aeternity/epoch/pulls/1553","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/aeternity/epoch/pulls/comments/218461197"},"html":{"href":"https://github.com/aeternity/epoch/pull/1553#discussion_r218461197"},"pull_request":{"href":"https://api.github.com/repos/aeternity/epoch/pulls/1553"}},"in_reply_to_id":218201222},"pull_request":{"url":"https://api.github.com/repos/aeternity/epoch/pulls/1553","id":215257421,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE1MjU3NDIx","html_url":"https://github.com/aeternity/epoch/pull/1553","diff_url":"https://github.com/aeternity/epoch/pull/1553.diff","patch_url":"https://github.com/aeternity/epoch/pull/1553.patch","issue_url":"https://api.github.com/repos/aeternity/epoch/issues/1553","number":1553,"state":"open","locked":false,"title":"PT-160237116 SC Chain watching","user":{"login":"uwiger","id":160216,"node_id":"MDQ6VXNlcjE2MDIxNg==","avatar_url":"https://avatars3.githubusercontent.com/u/160216?v=4","gravatar_id":"","url":"https://api.github.com/users/uwiger","html_url":"https://github.com/uwiger","followers_url":"https://api.github.com/users/uwiger/followers","following_url":"https://api.github.com/users/uwiger/following{/other_user}","gists_url":"https://api.github.com/users/uwiger/gists{/gist_id}","starred_url":"https://api.github.com/users/uwiger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uwiger/subscriptions","organizations_url":"https://api.github.com/users/uwiger/orgs","repos_url":"https://api.github.com/users/uwiger/repos","events_url":"https://api.github.com/users/uwiger/events{/privacy}","received_events_url":"https://api.github.com/users/uwiger/received_events","type":"User","site_admin":false},"body":"See [PT #160237116](https://www.pivotaltracker.com/story/show/160237116)\r\n\r\nThe chain watcher detects if the channel object enters `closing` status, and informs the fsm, which terminates.\r\n\r\nAlso includes refactoring of the fsm's handling of general events, which was inconsistently implemented.","created_at":"2018-09-13T11:56:58Z","updated_at":"2018-09-18T14:41:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d8f36a309992abb9717c0281cdb432650fe04475","assignee":null,"assignees":[],"requested_reviewers":[{"login":"gorillainduction","id":7676988,"node_id":"MDQ6VXNlcjc2NzY5ODg=","avatar_url":"https://avatars2.githubusercontent.com/u/7676988?v=4","gravatar_id":"","url":"https://api.github.com/users/gorillainduction","html_url":"https://github.com/gorillainduction","followers_url":"https://api.github.com/users/gorillainduction/followers","following_url":"https://api.github.com/users/gorillainduction/following{/other_user}","gists_url":"https://api.github.com/users/gorillainduction/gists{/gist_id}","starred_url":"https://api.github.com/users/gorillainduction/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gorillainduction/subscriptions","organizations_url":"https://api.github.com/users/gorillainduction/orgs","repos_url":"https://api.github.com/users/gorillainduction/repos","events_url":"https://api.github.com/users/gorillainduction/events{/privacy}","received_events_url":"https://api.github.com/users/gorillainduction/received_events","type":"User","site_admin":false},{"login":"zp-sd","id":28924437,"node_id":"MDQ6VXNlcjI4OTI0NDM3","avatar_url":"https://avatars1.githubusercontent.com/u/28924437?v=4","gravatar_id":"","url":"https://api.github.com/users/zp-sd","html_url":"https://github.com/zp-sd","followers_url":"https://api.github.com/users/zp-sd/followers","following_url":"https://api.github.com/users/zp-sd/following{/other_user}","gists_url":"https://api.github.com/users/zp-sd/gists{/gist_id}","starred_url":"https://api.github.com/users/zp-sd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zp-sd/subscriptions","organizations_url":"https://api.github.com/users/zp-sd/orgs","repos_url":"https://api.github.com/users/zp-sd/repos","events_url":"https://api.github.com/users/zp-sd/events{/privacy}","received_events_url":"https://api.github.com/users/zp-sd/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/aeternity/epoch/pulls/1553/commits","review_comments_url":"https://api.github.com/repos/aeternity/epoch/pulls/1553/comments","review_comment_url":"https://api.github.com/repos/aeternity/epoch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aeternity/epoch/issues/1553/comments","statuses_url":"https://api.github.com/repos/aeternity/epoch/statuses/a5fb80bf3a21f368f5c2a7ff25889146d32170ec","head":{"label":"aeternity:PT-160237116-sc-chain-polling","ref":"PT-160237116-sc-chain-polling","sha":"a5fb80bf3a21f368f5c2a7ff25889146d32170ec","user":{"login":"aeternity","id":21989234,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxOTg5MjM0","avatar_url":"https://avatars1.githubusercontent.com/u/21989234?v=4","gravatar_id":"","url":"https://api.github.com/users/aeternity","html_url":"https://github.com/aeternity","followers_url":"https://api.github.com/users/aeternity/followers","following_url":"https://api.github.com/users/aeternity/following{/other_user}","gists_url":"https://api.github.com/users/aeternity/gists{/gist_id}","starred_url":"https://api.github.com/users/aeternity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aeternity/subscriptions","organizations_url":"https://api.github.com/users/aeternity/orgs","repos_url":"https://api.github.com/users/aeternity/repos","events_url":"https://api.github.com/users/aeternity/events{/privacy}","received_events_url":"https://api.github.com/users/aeternity/received_events","type":"Organization","site_admin":false},"repo":{"id":99802036,"node_id":"MDEwOlJlcG9zaXRvcnk5OTgwMjAzNg==","name":"epoch","full_name":"aeternity/epoch","private":false,"owner":{"login":"aeternity","id":21989234,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxOTg5MjM0","avatar_url":"https://avatars1.githubusercontent.com/u/21989234?v=4","gravatar_id":"","url":"https://api.github.com/users/aeternity","html_url":"https://github.com/aeternity","followers_url":"https://api.github.com/users/aeternity/followers","following_url":"https://api.github.com/users/aeternity/following{/other_user}","gists_url":"https://api.github.com/users/aeternity/gists{/gist_id}","starred_url":"https://api.github.com/users/aeternity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aeternity/subscriptions","organizations_url":"https://api.github.com/users/aeternity/orgs","repos_url":"https://api.github.com/users/aeternity/repos","events_url":"https://api.github.com/users/aeternity/events{/privacy}","received_events_url":"https://api.github.com/users/aeternity/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/aeternity/epoch","description":"æternity testnet: solving scalability problems by making sense of state-channels ","fork":false,"url":"https://api.github.com/repos/aeternity/epoch","forks_url":"https://api.github.com/repos/aeternity/epoch/forks","keys_url":"https://api.github.com/repos/aeternity/epoch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aeternity/epoch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aeternity/epoch/teams","hooks_url":"https://api.github.com/repos/aeternity/epoch/hooks","issue_events_url":"https://api.github.com/repos/aeternity/epoch/issues/events{/number}","events_url":"https://api.github.com/repos/aeternity/epoch/events","assignees_url":"https://api.github.com/repos/aeternity/epoch/assignees{/user}","branches_url":"https://api.github.com/repos/aeternity/epoch/branches{/branch}","tags_url":"https://api.github.com/repos/aeternity/epoch/tags","blobs_url":"https://api.github.com/repos/aeternity/epoch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aeternity/epoch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aeternity/epoch/git/refs{/sha}","trees_url":"https://api.github.com/repos/aeternity/epoch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aeternity/epoch/statuses/{sha}","languages_url":"https://api.github.com/repos/aeternity/epoch/languages","stargazers_url":"https://api.github.com/repos/aeternity/epoch/stargazers","contributors_url":"https://api.github.com/repos/aeternity/epoch/contributors","subscribers_url":"https://api.github.com/repos/aeternity/epoch/subscribers","subscription_url":"https://api.github.com/repos/aeternity/epoch/subscription","commits_url":"https://api.github.com/repos/aeternity/epoch/commits{/sha}","git_commits_url":"https://api.github.com/repos/aeternity/epoch/git/commits{/sha}","comments_url":"https://api.github.com/repos/aeternity/epoch/comments{/number}","issue_comment_url":"https://api.github.com/repos/aeternity/epoch/issues/comments{/number}","contents_url":"https://api.github.com/repos/aeternity/epoch/contents/{+path}","compare_url":"https://api.github.com/repos/aeternity/epoch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aeternity/epoch/merges","archive_url":"https://api.github.com/repos/aeternity/epoch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aeternity/epoch/downloads","issues_url":"https://api.github.com/repos/aeternity/epoch/issues{/number}","pulls_url":"https://api.github.com/repos/aeternity/epoch/pulls{/number}","milestones_url":"https://api.github.com/repos/aeternity/epoch/milestones{/number}","notifications_url":"https://api.github.com/repos/aeternity/epoch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aeternity/epoch/labels{/name}","releases_url":"https://api.github.com/repos/aeternity/epoch/releases{/id}","deployments_url":"https://api.github.com/repos/aeternity/epoch/deployments","created_at":"2017-08-09T11:44:30Z","updated_at":"2018-09-18T13:57:37Z","pushed_at":"2018-09-18T14:10:48Z","git_url":"git://github.com/aeternity/epoch.git","ssh_url":"git@github.com:aeternity/epoch.git","clone_url":"https://github.com/aeternity/epoch.git","svn_url":"https://github.com/aeternity/epoch","homepage":"http://www.aeternity.com","size":9704,"stargazers_count":656,"watchers_count":656,"language":"Erlang","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":115,"mirror_url":null,"archived":false,"open_issues_count":10,"license":{"key":"isc","name":"ISC License","spdx_id":"ISC","url":"https://api.github.com/licenses/isc","node_id":"MDc6TGljZW5zZTEw"},"forks":115,"open_issues":10,"watchers":656,"default_branch":"master"}},"base":{"label":"aeternity:master","ref":"master","sha":"1eebcb98e2ad98169f172654dac1270c2172097e","user":{"login":"aeternity","id":21989234,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxOTg5MjM0","avatar_url":"https://avatars1.githubusercontent.com/u/21989234?v=4","gravatar_id":"","url":"https://api.github.com/users/aeternity","html_url":"https://github.com/aeternity","followers_url":"https://api.github.com/users/aeternity/followers","following_url":"https://api.github.com/users/aeternity/following{/other_user}","gists_url":"https://api.github.com/users/aeternity/gists{/gist_id}","starred_url":"https://api.github.com/users/aeternity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aeternity/subscriptions","organizations_url":"https://api.github.com/users/aeternity/orgs","repos_url":"https://api.github.com/users/aeternity/repos","events_url":"https://api.github.com/users/aeternity/events{/privacy}","received_events_url":"https://api.github.com/users/aeternity/received_events","type":"Organization","site_admin":false},"repo":{"id":99802036,"node_id":"MDEwOlJlcG9zaXRvcnk5OTgwMjAzNg==","name":"epoch","full_name":"aeternity/epoch","private":false,"owner":{"login":"aeternity","id":21989234,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxOTg5MjM0","avatar_url":"https://avatars1.githubusercontent.com/u/21989234?v=4","gravatar_id":"","url":"https://api.github.com/users/aeternity","html_url":"https://github.com/aeternity","followers_url":"https://api.github.com/users/aeternity/followers","following_url":"https://api.github.com/users/aeternity/following{/other_user}","gists_url":"https://api.github.com/users/aeternity/gists{/gist_id}","starred_url":"https://api.github.com/users/aeternity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aeternity/subscriptions","organizations_url":"https://api.github.com/users/aeternity/orgs","repos_url":"https://api.github.com/users/aeternity/repos","events_url":"https://api.github.com/users/aeternity/events{/privacy}","received_events_url":"https://api.github.com/users/aeternity/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/aeternity/epoch","description":"æternity testnet: solving scalability problems by making sense of state-channels ","fork":false,"url":"https://api.github.com/repos/aeternity/epoch","forks_url":"https://api.github.com/repos/aeternity/epoch/forks","keys_url":"https://api.github.com/repos/aeternity/epoch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aeternity/epoch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aeternity/epoch/teams","hooks_url":"https://api.github.com/repos/aeternity/epoch/hooks","issue_events_url":"https://api.github.com/repos/aeternity/epoch/issues/events{/number}","events_url":"https://api.github.com/repos/aeternity/epoch/events","assignees_url":"https://api.github.com/repos/aeternity/epoch/assignees{/user}","branches_url":"https://api.github.com/repos/aeternity/epoch/branches{/branch}","tags_url":"https://api.github.com/repos/aeternity/epoch/tags","blobs_url":"https://api.github.com/repos/aeternity/epoch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aeternity/epoch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aeternity/epoch/git/refs{/sha}","trees_url":"https://api.github.com/repos/aeternity/epoch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aeternity/epoch/statuses/{sha}","languages_url":"https://api.github.com/repos/aeternity/epoch/languages","stargazers_url":"https://api.github.com/repos/aeternity/epoch/stargazers","contributors_url":"https://api.github.com/repos/aeternity/epoch/contributors","subscribers_url":"https://api.github.com/repos/aeternity/epoch/subscribers","subscription_url":"https://api.github.com/repos/aeternity/epoch/subscription","commits_url":"https://api.github.com/repos/aeternity/epoch/commits{/sha}","git_commits_url":"https://api.github.com/repos/aeternity/epoch/git/commits{/sha}","comments_url":"https://api.github.com/repos/aeternity/epoch/comments{/number}","issue_comment_url":"https://api.github.com/repos/aeternity/epoch/issues/comments{/number}","contents_url":"https://api.github.com/repos/aeternity/epoch/contents/{+path}","compare_url":"https://api.github.com/repos/aeternity/epoch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aeternity/epoch/merges","archive_url":"https://api.github.com/repos/aeternity/epoch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aeternity/epoch/downloads","issues_url":"https://api.github.com/repos/aeternity/epoch/issues{/number}","pulls_url":"https://api.github.com/repos/aeternity/epoch/pulls{/number}","milestones_url":"https://api.github.com/repos/aeternity/epoch/milestones{/number}","notifications_url":"https://api.github.com/repos/aeternity/epoch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aeternity/epoch/labels{/name}","releases_url":"https://api.github.com/repos/aeternity/epoch/releases{/id}","deployments_url":"https://api.github.com/repos/aeternity/epoch/deployments","created_at":"2017-08-09T11:44:30Z","updated_at":"2018-09-18T13:57:37Z","pushed_at":"2018-09-18T14:10:48Z","git_url":"git://github.com/aeternity/epoch.git","ssh_url":"git@github.com:aeternity/epoch.git","clone_url":"https://github.com/aeternity/epoch.git","svn_url":"https://github.com/aeternity/epoch","homepage":"http://www.aeternity.com","size":9704,"stargazers_count":656,"watchers_count":656,"language":"Erlang","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":115,"mirror_url":null,"archived":false,"open_issues_count":10,"license":{"key":"isc","name":"ISC License","spdx_id":"ISC","url":"https://api.github.com/licenses/isc","node_id":"MDc6TGljZW5zZTEw"},"forks":115,"open_issues":10,"watchers":656,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aeternity/epoch/pulls/1553"},"html":{"href":"https://github.com/aeternity/epoch/pull/1553"},"issue":{"href":"https://api.github.com/repos/aeternity/epoch/issues/1553"},"comments":{"href":"https://api.github.com/repos/aeternity/epoch/issues/1553/comments"},"review_comments":{"href":"https://api.github.com/repos/aeternity/epoch/pulls/1553/comments"},"review_comment":{"href":"https://api.github.com/repos/aeternity/epoch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aeternity/epoch/pulls/1553/commits"},"statuses":{"href":"https://api.github.com/repos/aeternity/epoch/statuses/a5fb80bf3a21f368f5c2a7ff25889146d32170ec"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"uwiger"}}