{"action":"created","issue":{"url":"https://api.github.com/repos/bitpay/bitcore-p2p/issues/48","labels_url":"https://api.github.com/repos/bitpay/bitcore-p2p/issues/48/labels{/name}","comments_url":"https://api.github.com/repos/bitpay/bitcore-p2p/issues/48/comments","events_url":"https://api.github.com/repos/bitpay/bitcore-p2p/issues/48/events","html_url":"https://github.com/bitpay/bitcore-p2p/pull/48","id":60733226,"number":48,"title":"Extensible Messages","user":{"login":"braydonf","id":544777,"avatar_url":"https://avatars.githubusercontent.com/u/544777?v=3","gravatar_id":"","url":"https://api.github.com/users/braydonf","html_url":"https://github.com/braydonf","followers_url":"https://api.github.com/users/braydonf/followers","following_url":"https://api.github.com/users/braydonf/following{/other_user}","gists_url":"https://api.github.com/users/braydonf/gists{/gist_id}","starred_url":"https://api.github.com/users/braydonf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/braydonf/subscriptions","organizations_url":"https://api.github.com/users/braydonf/orgs","repos_url":"https://api.github.com/users/braydonf/repos","events_url":"https://api.github.com/users/braydonf/events{/privacy}","received_events_url":"https://api.github.com/users/braydonf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-03-11T21:30:42Z","updated_at":"2015-03-17T17:59:36Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/bitpay/bitcore-p2p/pulls/48","html_url":"https://github.com/bitpay/bitcore-p2p/pull/48","diff_url":"https://github.com/bitpay/bitcore-p2p/pull/48.diff","patch_url":"https://github.com/bitpay/bitcore-p2p/pull/48.patch"},"body":"- Messages are now built with a factory that can be customized with an options argument to `Messages`, for example:\r\n ```javascript\r\nvar messages = new Messages({Block: Block, magicNumber: 0x0b120907});\r\nvar message = messages.GetData.forBlock(inv.hash);\r\npeer.sendMessage(message);\r\n```\r\nAdditionally, individual message constructors have been organized into separate files.\r\n\r\n- Peer and Pool now have options defined as an object to avoid needing to pass in \"null, null, true\" as arguments, for example:\r\n ```javascript\r\nvar pool = new Pool({relay: false, dnsSeed: false, network: Networks.testnet});\r\n```\r\n\r\n- Adds an Inventory constructor to be shared between several of the message types, separate from the Inventory message.\r\n\r\n- Changes to use BufferWriter instead of needing the  \"bufferput\" dependency.\r\n\r\n- Adds a `listen()` method to Pool to enable remote peers to be added to the pool upon incoming connections, enables bitcore to bitcore node connectivity.\r\n\r\n- Will disconnect a peer on error (to avoid _connectedPeers having invalid peers).\r\n\r\n- Increases test coverage"},"comment":{"url":"https://api.github.com/repos/bitpay/bitcore-p2p/issues/comments/82499882","html_url":"https://github.com/bitpay/bitcore-p2p/pull/48#issuecomment-82499882","issue_url":"https://api.github.com/repos/bitpay/bitcore-p2p/issues/48","id":82499882,"user":{"login":"maraoz","id":287189,"avatar_url":"https://avatars.githubusercontent.com/u/287189?v=3","gravatar_id":"","url":"https://api.github.com/users/maraoz","html_url":"https://github.com/maraoz","followers_url":"https://api.github.com/users/maraoz/followers","following_url":"https://api.github.com/users/maraoz/following{/other_user}","gists_url":"https://api.github.com/users/maraoz/gists{/gist_id}","starred_url":"https://api.github.com/users/maraoz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maraoz/subscriptions","organizations_url":"https://api.github.com/users/maraoz/orgs","repos_url":"https://api.github.com/users/maraoz/repos","events_url":"https://api.github.com/users/maraoz/events{/privacy}","received_events_url":"https://api.github.com/users/maraoz/received_events","type":"User","site_admin":false},"created_at":"2015-03-17T17:59:36Z","updated_at":"2015-03-17T17:59:36Z","body":"Great work in general, left some small comments. Please fix/reply and I'll be happy to merge this :)"}}