{"action":"created","comment":{"url":"https://api.github.com/repos/nknorg/nkn/pulls/comments/224105569","pull_request_review_id":163392251,"id":224105569,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNDEwNTU2OQ==","diff_hunk":"@@ -43,14 +38,18 @@ func (tp *TxnPool) AppendTxnPool(txn *Transaction) ErrCode {\n \t\tlog.Info(\"Transaction verification failed\", txn.Hash())\n \t\treturn errCode\n \t}\n+\tvar txnList []*Transaction\n+\tfor _, tx := range tp.txnList {\n+\t\ttxnList = append(txnList, tx)\n+\t}\n+\tif errCode := VerifyTransactionWithBlock(txnList); errCode != ErrNoError {","path":"core/transaction/pool/pool.go","position":32,"original_position":32,"commit_id":"5def480820729c0582d3161f2771178540a94618","original_commit_id":"5def480820729c0582d3161f2771178540a94618","user":{"login":"NoelBright","id":38207825,"node_id":"MDQ6VXNlcjM4MjA3ODI1","avatar_url":"https://avatars1.githubusercontent.com/u/38207825?v=4","gravatar_id":"","url":"https://api.github.com/users/NoelBright","html_url":"https://github.com/NoelBright","followers_url":"https://api.github.com/users/NoelBright/followers","following_url":"https://api.github.com/users/NoelBright/following{/other_user}","gists_url":"https://api.github.com/users/NoelBright/gists{/gist_id}","starred_url":"https://api.github.com/users/NoelBright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NoelBright/subscriptions","organizations_url":"https://api.github.com/users/NoelBright/orgs","repos_url":"https://api.github.com/users/NoelBright/repos","events_url":"https://api.github.com/users/NoelBright/events{/privacy}","received_events_url":"https://api.github.com/users/NoelBright/received_events","type":"User","site_admin":false},"body":"this will cost a lot of time to verify a transaction, when the txpool is very large.","created_at":"2018-10-10T14:39:44Z","updated_at":"2018-10-10T14:39:44Z","html_url":"https://github.com/nknorg/nkn/pull/331#discussion_r224105569","pull_request_url":"https://api.github.com/repos/nknorg/nkn/pulls/331","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/nknorg/nkn/pulls/comments/224105569"},"html":{"href":"https://github.com/nknorg/nkn/pull/331#discussion_r224105569"},"pull_request":{"href":"https://api.github.com/repos/nknorg/nkn/pulls/331"}}},"pull_request":{"url":"https://api.github.com/repos/nknorg/nkn/pulls/331","id":221597657,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIxNTk3NjU3","html_url":"https://github.com/nknorg/nkn/pull/331","diff_url":"https://github.com/nknorg/nkn/pull/331.diff","patch_url":"https://github.com/nknorg/nkn/pull/331.patch","issue_url":"https://api.github.com/repos/nknorg/nkn/issues/331","number":331,"state":"open","locked":false,"title":"validate tx with other txs inside pool/block","user":{"login":"trueinsider","id":662644,"node_id":"MDQ6VXNlcjY2MjY0NA==","avatar_url":"https://avatars3.githubusercontent.com/u/662644?v=4","gravatar_id":"","url":"https://api.github.com/users/trueinsider","html_url":"https://github.com/trueinsider","followers_url":"https://api.github.com/users/trueinsider/followers","following_url":"https://api.github.com/users/trueinsider/following{/other_user}","gists_url":"https://api.github.com/users/trueinsider/gists{/gist_id}","starred_url":"https://api.github.com/users/trueinsider/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trueinsider/subscriptions","organizations_url":"https://api.github.com/users/trueinsider/orgs","repos_url":"https://api.github.com/users/trueinsider/repos","events_url":"https://api.github.com/users/trueinsider/events{/privacy}","received_events_url":"https://api.github.com/users/trueinsider/received_events","type":"User","site_admin":false},"body":"### Proposed changes in this pull request\r\nTransactions should be validated with other transactions in pool/block when transaction is received or block is proposed/received/voted. Unify validation logic.\r\n\r\n### Type\r\n- [x] Bug fix: Link to the issue\r\n- [ ] Feature (Non-breaking change)\r\n- [ ] Feature (Breaking change)\r\n- [ ] Documentation Improvement\r\n\r\n### Checklist\r\n- [x] Read the [CONTRIBUTION guidelines](https://github.com/nknorg/nkn#contributing).\r\n- [x] All the tests are passing after the introduction of new changes.\r\n- [ ] Added tests respective to the part of code I have written.\r\n- [ ] Added proper documentation where ever applicable (in code and README.md).\r\n- [x] Code has been written according to [NKN-Golang-Style-Guide](https://github.com/nknorg/nkn/wiki/NKN-Golang-Style-Guide)","created_at":"2018-10-09T21:52:03Z","updated_at":"2018-10-10T14:39:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5eb0cfca0da76b9abe19fa9d5be9f3d580920548","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/nknorg/nkn/pulls/331/commits","review_comments_url":"https://api.github.com/repos/nknorg/nkn/pulls/331/comments","review_comment_url":"https://api.github.com/repos/nknorg/nkn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nknorg/nkn/issues/331/comments","statuses_url":"https://api.github.com/repos/nknorg/nkn/statuses/5def480820729c0582d3161f2771178540a94618","head":{"label":"trueinsider:master","ref":"master","sha":"5def480820729c0582d3161f2771178540a94618","user":{"login":"trueinsider","id":662644,"node_id":"MDQ6VXNlcjY2MjY0NA==","avatar_url":"https://avatars3.githubusercontent.com/u/662644?v=4","gravatar_id":"","url":"https://api.github.com/users/trueinsider","html_url":"https://github.com/trueinsider","followers_url":"https://api.github.com/users/trueinsider/followers","following_url":"https://api.github.com/users/trueinsider/following{/other_user}","gists_url":"https://api.github.com/users/trueinsider/gists{/gist_id}","starred_url":"https://api.github.com/users/trueinsider/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trueinsider/subscriptions","organizations_url":"https://api.github.com/users/trueinsider/orgs","repos_url":"https://api.github.com/users/trueinsider/repos","events_url":"https://api.github.com/users/trueinsider/events{/privacy}","received_events_url":"https://api.github.com/users/trueinsider/received_events","type":"User","site_admin":false},"repo":{"id":142361742,"node_id":"MDEwOlJlcG9zaXRvcnkxNDIzNjE3NDI=","name":"nkn","full_name":"trueinsider/nkn","private":false,"owner":{"login":"trueinsider","id":662644,"node_id":"MDQ6VXNlcjY2MjY0NA==","avatar_url":"https://avatars3.githubusercontent.com/u/662644?v=4","gravatar_id":"","url":"https://api.github.com/users/trueinsider","html_url":"https://github.com/trueinsider","followers_url":"https://api.github.com/users/trueinsider/followers","following_url":"https://api.github.com/users/trueinsider/following{/other_user}","gists_url":"https://api.github.com/users/trueinsider/gists{/gist_id}","starred_url":"https://api.github.com/users/trueinsider/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trueinsider/subscriptions","organizations_url":"https://api.github.com/users/trueinsider/orgs","repos_url":"https://api.github.com/users/trueinsider/repos","events_url":"https://api.github.com/users/trueinsider/events{/privacy}","received_events_url":"https://api.github.com/users/trueinsider/received_events","type":"User","site_admin":false},"html_url":"https://github.com/trueinsider/nkn","description":"NKN blockchain system in Golang","fork":true,"url":"https://api.github.com/repos/trueinsider/nkn","forks_url":"https://api.github.com/repos/trueinsider/nkn/forks","keys_url":"https://api.github.com/repos/trueinsider/nkn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/trueinsider/nkn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/trueinsider/nkn/teams","hooks_url":"https://api.github.com/repos/trueinsider/nkn/hooks","issue_events_url":"https://api.github.com/repos/trueinsider/nkn/issues/events{/number}","events_url":"https://api.github.com/repos/trueinsider/nkn/events","assignees_url":"https://api.github.com/repos/trueinsider/nkn/assignees{/user}","branches_url":"https://api.github.com/repos/trueinsider/nkn/branches{/branch}","tags_url":"https://api.github.com/repos/trueinsider/nkn/tags","blobs_url":"https://api.github.com/repos/trueinsider/nkn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/trueinsider/nkn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/trueinsider/nkn/git/refs{/sha}","trees_url":"https://api.github.com/repos/trueinsider/nkn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/trueinsider/nkn/statuses/{sha}","languages_url":"https://api.github.com/repos/trueinsider/nkn/languages","stargazers_url":"https://api.github.com/repos/trueinsider/nkn/stargazers","contributors_url":"https://api.github.com/repos/trueinsider/nkn/contributors","subscribers_url":"https://api.github.com/repos/trueinsider/nkn/subscribers","subscription_url":"https://api.github.com/repos/trueinsider/nkn/subscription","commits_url":"https://api.github.com/repos/trueinsider/nkn/commits{/sha}","git_commits_url":"https://api.github.com/repos/trueinsider/nkn/git/commits{/sha}","comments_url":"https://api.github.com/repos/trueinsider/nkn/comments{/number}","issue_comment_url":"https://api.github.com/repos/trueinsider/nkn/issues/comments{/number}","contents_url":"https://api.github.com/repos/trueinsider/nkn/contents/{+path}","compare_url":"https://api.github.com/repos/trueinsider/nkn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/trueinsider/nkn/merges","archive_url":"https://api.github.com/repos/trueinsider/nkn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/trueinsider/nkn/downloads","issues_url":"https://api.github.com/repos/trueinsider/nkn/issues{/number}","pulls_url":"https://api.github.com/repos/trueinsider/nkn/pulls{/number}","milestones_url":"https://api.github.com/repos/trueinsider/nkn/milestones{/number}","notifications_url":"https://api.github.com/repos/trueinsider/nkn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/trueinsider/nkn/labels{/name}","releases_url":"https://api.github.com/repos/trueinsider/nkn/releases{/id}","deployments_url":"https://api.github.com/repos/trueinsider/nkn/deployments","created_at":"2018-07-25T22:55:05Z","updated_at":"2018-10-09T21:49:23Z","pushed_at":"2018-10-09T21:49:22Z","git_url":"git://github.com/trueinsider/nkn.git","ssh_url":"git@github.com:trueinsider/nkn.git","clone_url":"https://github.com/trueinsider/nkn.git","svn_url":"https://github.com/trueinsider/nkn","homepage":"https://www.nkn.org","size":3039,"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":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"nknorg:master","ref":"master","sha":"8f8ce3dfc3535196630d7cb047b4bc7ace32ff6a","user":{"login":"nknorg","id":35023685,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1MDIzNjg1","avatar_url":"https://avatars0.githubusercontent.com/u/35023685?v=4","gravatar_id":"","url":"https://api.github.com/users/nknorg","html_url":"https://github.com/nknorg","followers_url":"https://api.github.com/users/nknorg/followers","following_url":"https://api.github.com/users/nknorg/following{/other_user}","gists_url":"https://api.github.com/users/nknorg/gists{/gist_id}","starred_url":"https://api.github.com/users/nknorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nknorg/subscriptions","organizations_url":"https://api.github.com/users/nknorg/orgs","repos_url":"https://api.github.com/users/nknorg/repos","events_url":"https://api.github.com/users/nknorg/events{/privacy}","received_events_url":"https://api.github.com/users/nknorg/received_events","type":"Organization","site_admin":false},"repo":{"id":119047243,"node_id":"MDEwOlJlcG9zaXRvcnkxMTkwNDcyNDM=","name":"nkn","full_name":"nknorg/nkn","private":false,"owner":{"login":"nknorg","id":35023685,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1MDIzNjg1","avatar_url":"https://avatars0.githubusercontent.com/u/35023685?v=4","gravatar_id":"","url":"https://api.github.com/users/nknorg","html_url":"https://github.com/nknorg","followers_url":"https://api.github.com/users/nknorg/followers","following_url":"https://api.github.com/users/nknorg/following{/other_user}","gists_url":"https://api.github.com/users/nknorg/gists{/gist_id}","starred_url":"https://api.github.com/users/nknorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nknorg/subscriptions","organizations_url":"https://api.github.com/users/nknorg/orgs","repos_url":"https://api.github.com/users/nknorg/repos","events_url":"https://api.github.com/users/nknorg/events{/privacy}","received_events_url":"https://api.github.com/users/nknorg/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/nknorg/nkn","description":"NKN blockchain system in Golang","fork":false,"url":"https://api.github.com/repos/nknorg/nkn","forks_url":"https://api.github.com/repos/nknorg/nkn/forks","keys_url":"https://api.github.com/repos/nknorg/nkn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nknorg/nkn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nknorg/nkn/teams","hooks_url":"https://api.github.com/repos/nknorg/nkn/hooks","issue_events_url":"https://api.github.com/repos/nknorg/nkn/issues/events{/number}","events_url":"https://api.github.com/repos/nknorg/nkn/events","assignees_url":"https://api.github.com/repos/nknorg/nkn/assignees{/user}","branches_url":"https://api.github.com/repos/nknorg/nkn/branches{/branch}","tags_url":"https://api.github.com/repos/nknorg/nkn/tags","blobs_url":"https://api.github.com/repos/nknorg/nkn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nknorg/nkn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nknorg/nkn/git/refs{/sha}","trees_url":"https://api.github.com/repos/nknorg/nkn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nknorg/nkn/statuses/{sha}","languages_url":"https://api.github.com/repos/nknorg/nkn/languages","stargazers_url":"https://api.github.com/repos/nknorg/nkn/stargazers","contributors_url":"https://api.github.com/repos/nknorg/nkn/contributors","subscribers_url":"https://api.github.com/repos/nknorg/nkn/subscribers","subscription_url":"https://api.github.com/repos/nknorg/nkn/subscription","commits_url":"https://api.github.com/repos/nknorg/nkn/commits{/sha}","git_commits_url":"https://api.github.com/repos/nknorg/nkn/git/commits{/sha}","comments_url":"https://api.github.com/repos/nknorg/nkn/comments{/number}","issue_comment_url":"https://api.github.com/repos/nknorg/nkn/issues/comments{/number}","contents_url":"https://api.github.com/repos/nknorg/nkn/contents/{+path}","compare_url":"https://api.github.com/repos/nknorg/nkn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nknorg/nkn/merges","archive_url":"https://api.github.com/repos/nknorg/nkn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nknorg/nkn/downloads","issues_url":"https://api.github.com/repos/nknorg/nkn/issues{/number}","pulls_url":"https://api.github.com/repos/nknorg/nkn/pulls{/number}","milestones_url":"https://api.github.com/repos/nknorg/nkn/milestones{/number}","notifications_url":"https://api.github.com/repos/nknorg/nkn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nknorg/nkn/labels{/name}","releases_url":"https://api.github.com/repos/nknorg/nkn/releases{/id}","deployments_url":"https://api.github.com/repos/nknorg/nkn/deployments","created_at":"2018-01-26T12:07:15Z","updated_at":"2018-10-10T12:23:48Z","pushed_at":"2018-10-10T12:39:44Z","git_url":"git://github.com/nknorg/nkn.git","ssh_url":"git@github.com:nknorg/nkn.git","clone_url":"https://github.com/nknorg/nkn.git","svn_url":"https://github.com/nknorg/nkn","homepage":"https://www.nkn.org","size":3080,"stargazers_count":136,"watchers_count":136,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":65,"mirror_url":null,"archived":false,"open_issues_count":22,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":65,"open_issues":22,"watchers":136,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nknorg/nkn/pulls/331"},"html":{"href":"https://github.com/nknorg/nkn/pull/331"},"issue":{"href":"https://api.github.com/repos/nknorg/nkn/issues/331"},"comments":{"href":"https://api.github.com/repos/nknorg/nkn/issues/331/comments"},"review_comments":{"href":"https://api.github.com/repos/nknorg/nkn/pulls/331/comments"},"review_comment":{"href":"https://api.github.com/repos/nknorg/nkn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nknorg/nkn/pulls/331/commits"},"statuses":{"href":"https://api.github.com/repos/nknorg/nkn/statuses/5def480820729c0582d3161f2771178540a94618"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"NoelBright"}}