{"action":"created","issue":{"url":"https://api.github.com/repos/seeleteam/go-seele/issues/75","repository_url":"https://api.github.com/repos/seeleteam/go-seele","labels_url":"https://api.github.com/repos/seeleteam/go-seele/issues/75/labels{/name}","comments_url":"https://api.github.com/repos/seeleteam/go-seele/issues/75/comments","events_url":"https://api.github.com/repos/seeleteam/go-seele/issues/75/events","html_url":"https://github.com/seeleteam/go-seele/pull/75","id":305080015,"number":75,"title":"Task txpool processable txs","user":{"login":"boqiu","id":35757521,"avatar_url":"https://avatars1.githubusercontent.com/u/35757521?v=4","gravatar_id":"","url":"https://api.github.com/users/boqiu","html_url":"https://github.com/boqiu","followers_url":"https://api.github.com/users/boqiu/followers","following_url":"https://api.github.com/users/boqiu/following{/other_user}","gists_url":"https://api.github.com/users/boqiu/gists{/gist_id}","starred_url":"https://api.github.com/users/boqiu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boqiu/subscriptions","organizations_url":"https://api.github.com/users/boqiu/orgs","repos_url":"https://api.github.com/users/boqiu/repos","events_url":"https://api.github.com/users/boqiu/events{/privacy}","received_events_url":"https://api.github.com/users/boqiu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-03-14T09:26:40Z","updated_at":"2018-03-14T09:51:55Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/seeleteam/go-seele/pulls/75","html_url":"https://github.com/seeleteam/go-seele/pull/75","diff_url":"https://github.com/seeleteam/go-seele/pull/75.diff","patch_url":"https://github.com/seeleteam/go-seele/pull/75.patch"},"body":"Add 2 APIs for tx pool:\r\n1) Get tx by hash\r\n2) Get processable txs from tx pool.\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/seeleteam/go-seele/75)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/seeleteam/go-seele/issues/comments/372963634","html_url":"https://github.com/seeleteam/go-seele/pull/75#issuecomment-372963634","issue_url":"https://api.github.com/repos/seeleteam/go-seele/issues/75","id":372963634,"user":{"login":"boqiu","id":35757521,"avatar_url":"https://avatars1.githubusercontent.com/u/35757521?v=4","gravatar_id":"","url":"https://api.github.com/users/boqiu","html_url":"https://github.com/boqiu","followers_url":"https://api.github.com/users/boqiu/followers","following_url":"https://api.github.com/users/boqiu/following{/other_user}","gists_url":"https://api.github.com/users/boqiu/gists{/gist_id}","starred_url":"https://api.github.com/users/boqiu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boqiu/subscriptions","organizations_url":"https://api.github.com/users/boqiu/orgs","repos_url":"https://api.github.com/users/boqiu/repos","events_url":"https://api.github.com/users/boqiu/events{/privacy}","received_events_url":"https://api.github.com/users/boqiu/received_events","type":"User","site_admin":false},"created_at":"2018-03-14T09:51:55Z","updated_at":"2018-03-14T09:51:55Z","author_association":"CONTRIBUTOR","body":"\n\n\n\nReview status: 0 of 4 files reviewed at latest revision, 3 unresolved discussions.\n\n---\n\n*[core/tx_collection.go, line 28 at r1](https://reviewable.io:443/reviews/seeleteam/go-seele/75#-L7Yr6t74MnT1ou4O783:-L7YtnVOwK3xur4ydV3x:b-7i7mgl) ([raw file](https://github.com/seeleteam/go-seele/blob/e68b43c694c99420fcb5c56dbae432416a14b1c5/core/tx_collection.go#L28)):*\n<details><summary><i>Previously, WTer wrote…</i></summary><blockquote>\n\n> getTxs\n\nSeems getAllTxs would be better according to your implementation.\n\ngetTxs can be implemented by passing some parameters like, range of nonce, or other conditions, I'm not sure if there is real requirement.\n</blockquote></details>\n\nThis API is not used outside of this file, it's a comment internal API to get txs for further operations, e.g. sort by nonce. So, it's ok at this moment.\n\nAnyway, if new API (e.g. getTxs(filter)) added in future, will change this one to getAllTxs().\n\n---\n\n*[core/tx_pool.go, line 74 at r1](https://reviewable.io:443/reviews/seeleteam/go-seele/75#-L7YsAql5z_QiHlG2x6W:-L7YuTaCozmSr80Nl7AQ:b-iup2ot) ([raw file](https://github.com/seeleteam/go-seele/blob/e68b43c694c99420fcb5c56dbae432416a14b1c5/core/tx_pool.go#L74)):*\n<details><summary><i>Previously, WTer wrote…</i></summary><blockquote>\n\n> pool.hashToTxMap[txHash]\n\njust discussion: add a new thread-safe function pool.tryGetTxByHash().\n</blockquote></details>\n\nGood idea. Let's consider to add ConcurrentMap structure in new PR, and then updates all the usage of map in the manner of thread safe.\n\n---\n\n*[core/tx_pool_test.go, line 126 at r1](https://reviewable.io:443/reviews/seeleteam/go-seele/75#-L7Yt0o2xkf6EXx1dTL3:-L7YuwglFTdzBN-mROhB:byfbhqs) ([raw file](https://github.com/seeleteam/go-seele/blob/e68b43c694c99420fcb5c56dbae432416a14b1c5/core/tx_pool_test.go#L126)):*\n<details><summary><i>Previously, lucusfly (lucus) wrote…</i></summary><blockquote>\n\nbetter to add duplicate nonce test\n</blockquote></details>\n\nSee Test_txCollection_add_txsWithSameNonce\n\n---\n\n\n*Comments from [Reviewable](https://reviewable.io:443/reviews/seeleteam/go-seele/75)*\n<!-- Sent from Reviewable.io -->\n"}}
{"actor":{"display_login":"boqiu"}}