{"action":"created","issue":{"url":"https://api.github.com/repos/ExchangeUnion/xud/issues/294","repository_url":"https://api.github.com/repos/ExchangeUnion/xud","labels_url":"https://api.github.com/repos/ExchangeUnion/xud/issues/294/labels{/name}","comments_url":"https://api.github.com/repos/ExchangeUnion/xud/issues/294/comments","events_url":"https://api.github.com/repos/ExchangeUnion/xud/issues/294/events","html_url":"https://github.com/ExchangeUnion/xud/issues/294","id":348294678,"node_id":"MDU6SXNzdWUzNDgyOTQ2Nzg=","number":294,"title":"pool.init is called before server is \"ready\"","user":{"login":"offerm","id":9712754,"node_id":"MDQ6VXNlcjk3MTI3NTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/9712754?v=4","gravatar_id":"","url":"https://api.github.com/users/offerm","html_url":"https://github.com/offerm","followers_url":"https://api.github.com/users/offerm/followers","following_url":"https://api.github.com/users/offerm/following{/other_user}","gists_url":"https://api.github.com/users/offerm/gists{/gist_id}","starred_url":"https://api.github.com/users/offerm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/offerm/subscriptions","organizations_url":"https://api.github.com/users/offerm/orgs","repos_url":"https://api.github.com/users/offerm/repos","events_url":"https://api.github.com/users/offerm/events{/privacy}","received_events_url":"https://api.github.com/users/offerm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-07T12:14:28Z","updated_at":"2018-08-07T12:37:25Z","closed_at":null,"author_association":"NONE","body":"Guys,\r\n\r\nCan you please check this. \r\nLooks like pool.init() is called before the server is ready.  pool.init open the listen port and restore connections with peers based on the hosts table. If the server is not ready, some peers may send packets and get wrong responses.\r\n\r\nShould init be called at the end of the setup?\r\n"},"comment":{"url":"https://api.github.com/repos/ExchangeUnion/xud/issues/comments/411041108","html_url":"https://github.com/ExchangeUnion/xud/issues/294#issuecomment-411041108","issue_url":"https://api.github.com/repos/ExchangeUnion/xud/issues/294","id":411041108,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMTA0MTEwOA==","user":{"login":"sangaman","id":3440835,"node_id":"MDQ6VXNlcjM0NDA4MzU=","avatar_url":"https://avatars1.githubusercontent.com/u/3440835?v=4","gravatar_id":"","url":"https://api.github.com/users/sangaman","html_url":"https://github.com/sangaman","followers_url":"https://api.github.com/users/sangaman/followers","following_url":"https://api.github.com/users/sangaman/following{/other_user}","gists_url":"https://api.github.com/users/sangaman/gists{/gist_id}","starred_url":"https://api.github.com/users/sangaman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sangaman/subscriptions","organizations_url":"https://api.github.com/users/sangaman/orgs","repos_url":"https://api.github.com/users/sangaman/repos","events_url":"https://api.github.com/users/sangaman/events{/privacy}","received_events_url":"https://api.github.com/users/sangaman/received_events","type":"User","site_admin":false},"created_at":"2018-08-07T12:37:25Z","updated_at":"2018-08-07T12:37:25Z","author_association":"COLLABORATOR","body":"I think you are right. I think `pool.init()` should get an `await` and move below `await this.orderbook.init()` but still above where the grpc server is initialized. I just tried that and the server starts up normally, and it definitely makes sense that the orderbook should be initialized before we start connecting to peers - particularly given that GET_ORDERS and ORDERS are among the first packets that will be transmitted."}}
{"actor":{"display_login":"sangaman"}}