{"action":"created","comment":{"url":"https://api.github.com/repos/CodeChain-io/codechain/pulls/comments/221180286","pull_request_review_id":159767538,"id":221180286,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMTE4MDI4Ng==","diff_hunk":"@@ -0,0 +1,215 @@\n+// Copyright 2018 Kodebox, Inc.\n+// This file is part of CodeChain.\n+//\n+// This program is free software: you can redistribute it and/or modify\n+// it under the terms of the GNU Affero General Public License as\n+// published by the Free Software Foundation, either version 3 of the\n+// License, or (at your option) any later version.\n+//\n+// This program is distributed in the hope that it will be useful,\n+// but WITHOUT ANY WARRANTY; without even the implied warranty of\n+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+// GNU Affero General Public License for more details.\n+//\n+// You should have received a copy of the GNU Affero General Public License\n+// along with this program.  If not, see <https://www.gnu.org/licenses/>.\n+\n+import { TestHelper } from \"codechain-test-helper/lib/testHelper\";\n+import CodeChain from \"../helper/spawn\";\n+import { H256 } from \"codechain-sdk/lib/core/H256\";\n+import { H160 } from \"codechain-sdk/lib/core/H160\";\n+import { U256 } from \"codechain-sdk/lib/core/U256\";\n+import { Header } from \"codechain-test-helper/lib/cHeader\";\n+\n+describe(\"Test onChain communication\", () => {\n+    let nodeA: CodeChain;\n+\n+    beforeEach(async () => {\n+        nodeA = new CodeChain({ logFlag: true });\n+        await nodeA.start();\n+    });\n+\n+    afterEach(async () => {\n+        await nodeA.clean();\n+    });\n+\n+    test(\"OnChain parcel propagation test\", async () => {\n+        const TH = new TestHelper(\"0.0.0.0\", nodeA.port);\n+        await TH.establish();\n+\n+        const sdk = nodeA.sdk;\n+\n+        const ACCOUNT_SECRET =\n+            process.env.ACCOUNT_SECRET ||\n+            \"ede1d4ccb4ec9a8bbbae9a13db3f4a7b56ea04189be86ac3a6a439d9a0a1addd\";\n+        const parcel = sdk.core.createPaymentParcel({\n+            recipient: \"tccqruq09sfgax77nj4gukjcuq69uzeyv0jcs7vzngg\",\n+            amount: 10000\n+        });\n+        const signedparcel = parcel.sign({\n+            secret: ACCOUNT_SECRET,\n+            fee: 10,\n+            nonce: 0\n+        });\n+\n+        await TH.sendEncodedParcel([signedparcel.toEncodeObject()]);\n+        const block = await sdk.rpc.chain.getBlock(1);","path":"test/src/integration/onChain.test.ts","position":56,"original_position":56,"commit_id":"60c1036778edd5c6ed4cc8ddf5ddc2d8a610bb28","original_commit_id":"60c1036778edd5c6ed4cc8ddf5ddc2d8a610bb28","user":{"login":"GNUp","id":30136201,"node_id":"MDQ6VXNlcjMwMTM2MjAx","avatar_url":"https://avatars1.githubusercontent.com/u/30136201?v=4","gravatar_id":"","url":"https://api.github.com/users/GNUp","html_url":"https://github.com/GNUp","followers_url":"https://api.github.com/users/GNUp/followers","following_url":"https://api.github.com/users/GNUp/following{/other_user}","gists_url":"https://api.github.com/users/GNUp/gists{/gist_id}","starred_url":"https://api.github.com/users/GNUp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GNUp/subscriptions","organizations_url":"https://api.github.com/users/GNUp/orgs","repos_url":"https://api.github.com/users/GNUp/repos","events_url":"https://api.github.com/users/GNUp/events{/privacy}","received_events_url":"https://api.github.com/users/GNUp/received_events","type":"User","site_admin":false},"body":"I changed it","created_at":"2018-09-28T08:41:00Z","updated_at":"2018-09-28T08:41:00Z","html_url":"https://github.com/CodeChain-io/codechain/pull/769#discussion_r221180286","pull_request_url":"https://api.github.com/repos/CodeChain-io/codechain/pulls/769","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/CodeChain-io/codechain/pulls/comments/221180286"},"html":{"href":"https://github.com/CodeChain-io/codechain/pull/769#discussion_r221180286"},"pull_request":{"href":"https://api.github.com/repos/CodeChain-io/codechain/pulls/769"}},"in_reply_to_id":221170318},"pull_request":{"url":"https://api.github.com/repos/CodeChain-io/codechain/pulls/769","id":218877599,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE4ODc3NTk5","html_url":"https://github.com/CodeChain-io/codechain/pull/769","diff_url":"https://github.com/CodeChain-io/codechain/pull/769.diff","patch_url":"https://github.com/CodeChain-io/codechain/pull/769.patch","issue_url":"https://api.github.com/repos/CodeChain-io/codechain/issues/769","number":769,"state":"open","locked":false,"title":"Add some test cases for on-chain synchronization","user":{"login":"GNUp","id":30136201,"node_id":"MDQ6VXNlcjMwMTM2MjAx","avatar_url":"https://avatars1.githubusercontent.com/u/30136201?v=4","gravatar_id":"","url":"https://api.github.com/users/GNUp","html_url":"https://github.com/GNUp","followers_url":"https://api.github.com/users/GNUp/followers","following_url":"https://api.github.com/users/GNUp/following{/other_user}","gists_url":"https://api.github.com/users/GNUp/gists{/gist_id}","starred_url":"https://api.github.com/users/GNUp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GNUp/subscriptions","organizations_url":"https://api.github.com/users/GNUp/orgs","repos_url":"https://api.github.com/users/GNUp/repos","events_url":"https://api.github.com/users/GNUp/events{/privacy}","received_events_url":"https://api.github.com/users/GNUp/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-09-28T07:30:05Z","updated_at":"2018-09-28T08:41:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"decdbb26b726a8e283966ffd8b459d91b39a2ce1","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/CodeChain-io/codechain/pulls/769/commits","review_comments_url":"https://api.github.com/repos/CodeChain-io/codechain/pulls/769/comments","review_comment_url":"https://api.github.com/repos/CodeChain-io/codechain/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CodeChain-io/codechain/issues/769/comments","statuses_url":"https://api.github.com/repos/CodeChain-io/codechain/statuses/60c1036778edd5c6ed4cc8ddf5ddc2d8a610bb28","head":{"label":"GNUp:test","ref":"test","sha":"60c1036778edd5c6ed4cc8ddf5ddc2d8a610bb28","user":{"login":"GNUp","id":30136201,"node_id":"MDQ6VXNlcjMwMTM2MjAx","avatar_url":"https://avatars1.githubusercontent.com/u/30136201?v=4","gravatar_id":"","url":"https://api.github.com/users/GNUp","html_url":"https://github.com/GNUp","followers_url":"https://api.github.com/users/GNUp/followers","following_url":"https://api.github.com/users/GNUp/following{/other_user}","gists_url":"https://api.github.com/users/GNUp/gists{/gist_id}","starred_url":"https://api.github.com/users/GNUp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GNUp/subscriptions","organizations_url":"https://api.github.com/users/GNUp/orgs","repos_url":"https://api.github.com/users/GNUp/repos","events_url":"https://api.github.com/users/GNUp/events{/privacy}","received_events_url":"https://api.github.com/users/GNUp/received_events","type":"User","site_admin":false},"repo":{"id":141529812,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE1Mjk4MTI=","name":"codechain","full_name":"GNUp/codechain","private":false,"owner":{"login":"GNUp","id":30136201,"node_id":"MDQ6VXNlcjMwMTM2MjAx","avatar_url":"https://avatars1.githubusercontent.com/u/30136201?v=4","gravatar_id":"","url":"https://api.github.com/users/GNUp","html_url":"https://github.com/GNUp","followers_url":"https://api.github.com/users/GNUp/followers","following_url":"https://api.github.com/users/GNUp/following{/other_user}","gists_url":"https://api.github.com/users/GNUp/gists{/gist_id}","starred_url":"https://api.github.com/users/GNUp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GNUp/subscriptions","organizations_url":"https://api.github.com/users/GNUp/orgs","repos_url":"https://api.github.com/users/GNUp/repos","events_url":"https://api.github.com/users/GNUp/events{/privacy}","received_events_url":"https://api.github.com/users/GNUp/received_events","type":"User","site_admin":false},"html_url":"https://github.com/GNUp/codechain","description":"Programmable multi-asset chain","fork":true,"url":"https://api.github.com/repos/GNUp/codechain","forks_url":"https://api.github.com/repos/GNUp/codechain/forks","keys_url":"https://api.github.com/repos/GNUp/codechain/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GNUp/codechain/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GNUp/codechain/teams","hooks_url":"https://api.github.com/repos/GNUp/codechain/hooks","issue_events_url":"https://api.github.com/repos/GNUp/codechain/issues/events{/number}","events_url":"https://api.github.com/repos/GNUp/codechain/events","assignees_url":"https://api.github.com/repos/GNUp/codechain/assignees{/user}","branches_url":"https://api.github.com/repos/GNUp/codechain/branches{/branch}","tags_url":"https://api.github.com/repos/GNUp/codechain/tags","blobs_url":"https://api.github.com/repos/GNUp/codechain/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GNUp/codechain/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GNUp/codechain/git/refs{/sha}","trees_url":"https://api.github.com/repos/GNUp/codechain/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GNUp/codechain/statuses/{sha}","languages_url":"https://api.github.com/repos/GNUp/codechain/languages","stargazers_url":"https://api.github.com/repos/GNUp/codechain/stargazers","contributors_url":"https://api.github.com/repos/GNUp/codechain/contributors","subscribers_url":"https://api.github.com/repos/GNUp/codechain/subscribers","subscription_url":"https://api.github.com/repos/GNUp/codechain/subscription","commits_url":"https://api.github.com/repos/GNUp/codechain/commits{/sha}","git_commits_url":"https://api.github.com/repos/GNUp/codechain/git/commits{/sha}","comments_url":"https://api.github.com/repos/GNUp/codechain/comments{/number}","issue_comment_url":"https://api.github.com/repos/GNUp/codechain/issues/comments{/number}","contents_url":"https://api.github.com/repos/GNUp/codechain/contents/{+path}","compare_url":"https://api.github.com/repos/GNUp/codechain/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GNUp/codechain/merges","archive_url":"https://api.github.com/repos/GNUp/codechain/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GNUp/codechain/downloads","issues_url":"https://api.github.com/repos/GNUp/codechain/issues{/number}","pulls_url":"https://api.github.com/repos/GNUp/codechain/pulls{/number}","milestones_url":"https://api.github.com/repos/GNUp/codechain/milestones{/number}","notifications_url":"https://api.github.com/repos/GNUp/codechain/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GNUp/codechain/labels{/name}","releases_url":"https://api.github.com/repos/GNUp/codechain/releases{/id}","deployments_url":"https://api.github.com/repos/GNUp/codechain/deployments","created_at":"2018-07-19T05:45:08Z","updated_at":"2018-07-19T05:45:11Z","pushed_at":"2018-09-28T07:28:57Z","git_url":"git://github.com/GNUp/codechain.git","ssh_url":"git@github.com:GNUp/codechain.git","clone_url":"https://github.com/GNUp/codechain.git","svn_url":"https://github.com/GNUp/codechain","homepage":"https://codechain.io/","size":4999,"stargazers_count":0,"watchers_count":0,"language":"Rust","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":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"CodeChain-io:master","ref":"master","sha":"b94001fafafa7a2708b5b4b7f212b9bce8598d64","user":{"login":"CodeChain-io","id":32665109,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyNjY1MTA5","avatar_url":"https://avatars1.githubusercontent.com/u/32665109?v=4","gravatar_id":"","url":"https://api.github.com/users/CodeChain-io","html_url":"https://github.com/CodeChain-io","followers_url":"https://api.github.com/users/CodeChain-io/followers","following_url":"https://api.github.com/users/CodeChain-io/following{/other_user}","gists_url":"https://api.github.com/users/CodeChain-io/gists{/gist_id}","starred_url":"https://api.github.com/users/CodeChain-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CodeChain-io/subscriptions","organizations_url":"https://api.github.com/users/CodeChain-io/orgs","repos_url":"https://api.github.com/users/CodeChain-io/repos","events_url":"https://api.github.com/users/CodeChain-io/events{/privacy}","received_events_url":"https://api.github.com/users/CodeChain-io/received_events","type":"Organization","site_admin":false},"repo":{"id":118557921,"node_id":"MDEwOlJlcG9zaXRvcnkxMTg1NTc5MjE=","name":"codechain","full_name":"CodeChain-io/codechain","private":false,"owner":{"login":"CodeChain-io","id":32665109,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyNjY1MTA5","avatar_url":"https://avatars1.githubusercontent.com/u/32665109?v=4","gravatar_id":"","url":"https://api.github.com/users/CodeChain-io","html_url":"https://github.com/CodeChain-io","followers_url":"https://api.github.com/users/CodeChain-io/followers","following_url":"https://api.github.com/users/CodeChain-io/following{/other_user}","gists_url":"https://api.github.com/users/CodeChain-io/gists{/gist_id}","starred_url":"https://api.github.com/users/CodeChain-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CodeChain-io/subscriptions","organizations_url":"https://api.github.com/users/CodeChain-io/orgs","repos_url":"https://api.github.com/users/CodeChain-io/repos","events_url":"https://api.github.com/users/CodeChain-io/events{/privacy}","received_events_url":"https://api.github.com/users/CodeChain-io/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/CodeChain-io/codechain","description":"Programmable multi-asset chain","fork":false,"url":"https://api.github.com/repos/CodeChain-io/codechain","forks_url":"https://api.github.com/repos/CodeChain-io/codechain/forks","keys_url":"https://api.github.com/repos/CodeChain-io/codechain/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CodeChain-io/codechain/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CodeChain-io/codechain/teams","hooks_url":"https://api.github.com/repos/CodeChain-io/codechain/hooks","issue_events_url":"https://api.github.com/repos/CodeChain-io/codechain/issues/events{/number}","events_url":"https://api.github.com/repos/CodeChain-io/codechain/events","assignees_url":"https://api.github.com/repos/CodeChain-io/codechain/assignees{/user}","branches_url":"https://api.github.com/repos/CodeChain-io/codechain/branches{/branch}","tags_url":"https://api.github.com/repos/CodeChain-io/codechain/tags","blobs_url":"https://api.github.com/repos/CodeChain-io/codechain/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CodeChain-io/codechain/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CodeChain-io/codechain/git/refs{/sha}","trees_url":"https://api.github.com/repos/CodeChain-io/codechain/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CodeChain-io/codechain/statuses/{sha}","languages_url":"https://api.github.com/repos/CodeChain-io/codechain/languages","stargazers_url":"https://api.github.com/repos/CodeChain-io/codechain/stargazers","contributors_url":"https://api.github.com/repos/CodeChain-io/codechain/contributors","subscribers_url":"https://api.github.com/repos/CodeChain-io/codechain/subscribers","subscription_url":"https://api.github.com/repos/CodeChain-io/codechain/subscription","commits_url":"https://api.github.com/repos/CodeChain-io/codechain/commits{/sha}","git_commits_url":"https://api.github.com/repos/CodeChain-io/codechain/git/commits{/sha}","comments_url":"https://api.github.com/repos/CodeChain-io/codechain/comments{/number}","issue_comment_url":"https://api.github.com/repos/CodeChain-io/codechain/issues/comments{/number}","contents_url":"https://api.github.com/repos/CodeChain-io/codechain/contents/{+path}","compare_url":"https://api.github.com/repos/CodeChain-io/codechain/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CodeChain-io/codechain/merges","archive_url":"https://api.github.com/repos/CodeChain-io/codechain/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CodeChain-io/codechain/downloads","issues_url":"https://api.github.com/repos/CodeChain-io/codechain/issues{/number}","pulls_url":"https://api.github.com/repos/CodeChain-io/codechain/pulls{/number}","milestones_url":"https://api.github.com/repos/CodeChain-io/codechain/milestones{/number}","notifications_url":"https://api.github.com/repos/CodeChain-io/codechain/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CodeChain-io/codechain/labels{/name}","releases_url":"https://api.github.com/repos/CodeChain-io/codechain/releases{/id}","deployments_url":"https://api.github.com/repos/CodeChain-io/codechain/deployments","created_at":"2018-01-23T04:31:56Z","updated_at":"2018-09-28T08:30:26Z","pushed_at":"2018-09-28T08:30:23Z","git_url":"git://github.com/CodeChain-io/codechain.git","ssh_url":"git@github.com:CodeChain-io/codechain.git","clone_url":"https://github.com/CodeChain-io/codechain.git","svn_url":"https://github.com/CodeChain-io/codechain","homepage":"https://codechain.io/","size":4965,"stargazers_count":171,"watchers_count":171,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":39,"mirror_url":null,"archived":false,"open_issues_count":90,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":39,"open_issues":90,"watchers":171,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CodeChain-io/codechain/pulls/769"},"html":{"href":"https://github.com/CodeChain-io/codechain/pull/769"},"issue":{"href":"https://api.github.com/repos/CodeChain-io/codechain/issues/769"},"comments":{"href":"https://api.github.com/repos/CodeChain-io/codechain/issues/769/comments"},"review_comments":{"href":"https://api.github.com/repos/CodeChain-io/codechain/pulls/769/comments"},"review_comment":{"href":"https://api.github.com/repos/CodeChain-io/codechain/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CodeChain-io/codechain/pulls/769/commits"},"statuses":{"href":"https://api.github.com/repos/CodeChain-io/codechain/statuses/60c1036778edd5c6ed4cc8ddf5ddc2d8a610bb28"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"GNUp"}}