{"action":"created","issue":{"url":"https://api.github.com/repos/mappum/bitcoin-net/issues/54","repository_url":"https://api.github.com/repos/mappum/bitcoin-net","labels_url":"https://api.github.com/repos/mappum/bitcoin-net/issues/54/labels{/name}","comments_url":"https://api.github.com/repos/mappum/bitcoin-net/issues/54/comments","events_url":"https://api.github.com/repos/mappum/bitcoin-net/issues/54/events","html_url":"https://github.com/mappum/bitcoin-net/issues/54","id":168468384,"number":54,"title":"Not working for Bitcoin testnet","user":{"login":"paulkernfeld","id":433803,"avatar_url":"https://avatars.githubusercontent.com/u/433803?v=3","gravatar_id":"","url":"https://api.github.com/users/paulkernfeld","html_url":"https://github.com/paulkernfeld","followers_url":"https://api.github.com/users/paulkernfeld/followers","following_url":"https://api.github.com/users/paulkernfeld/following{/other_user}","gists_url":"https://api.github.com/users/paulkernfeld/gists{/gist_id}","starred_url":"https://api.github.com/users/paulkernfeld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulkernfeld/subscriptions","organizations_url":"https://api.github.com/users/paulkernfeld/orgs","repos_url":"https://api.github.com/users/paulkernfeld/repos","events_url":"https://api.github.com/users/paulkernfeld/events{/privacy}","received_events_url":"https://api.github.com/users/paulkernfeld/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-30T13:54:46Z","updated_at":"2016-08-03T17:59:54Z","closed_at":null,"body":"When I run the tests w/ the Bitcoin testnet params, I get the error below.\r\n\r\nIt looks like some values in the test are hardcoded for the Bitcoin mainnet. However, I think that there might be actual functionality issues as well, because burnie seems to not work with bitcoin-net@4.\r\n\r\n```\r\n✓ PeerGroup constructor\r\n✓ invalid params\r\n✓ valid params, no options\r\n✓ valid params, with options\r\n✓ connect\r\n✓ peer methods\r\n✓ randomPeer\r\n⨯ getBlocks\r\n  not ok 19 no error\r\n    ---\r\n      operator: error\r\n      expected: |-\r\n        undefined\r\n      actual: |-\r\n        { [Error: Request timed out] timeout: true }\r\n      at: Timeout._onTimeout (/Users/paul/repos/bitcoin-net/lib/peer.js:9:23770)\r\n      stack: |-\r\n        Error: Request timed out\r\n            at Timeout._onTimeout (/Users/paul/repos/bitcoin-net/lib/peer.js:9:23640)\r\n            at tryOnTimeout (timers.js:224:11)\r\n            at Timer.listOnTimeout (timers.js:198:5)\r\n    ...\r\n  not ok 20 result is array\r\n    ---\r\n      operator: ok\r\n      expected: true\r\n      actual:   false\r\n      at: Timeout._onTimeout (/Users/paul/repos/bitcoin-net/lib/peer.js:9:23770)\r\n    ...\r\n/Users/paul/repos/bitcoin-net/test/build/peerGroup.js:101\r\n        t.equal(res.length, 1, 'result is correct length');\r\n                   ^\r\n\r\nTypeError: Cannot read property 'length' of undefined\r\n    at /Users/paul/repos/bitcoin-net/test/build/peerGroup.js:101:20\r\n    at Timeout._onTimeout (/Users/paul/repos/bitcoin-net/lib/peer.js:9:23770)\r\n    at tryOnTimeout (timers.js:224:11)\r\n    at Timer.listOnTimeout (timers.js:198:5)\r\n  ------------------------|----------|----------|----------|----------|----------------|\r\n  File                    |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |\r\n  ------------------------|----------|----------|----------|----------|----------------|\r\n   bitcoin-net/           |      100 |      100 |      100 |      100 |                |\r\n    index.js              |      100 |      100 |      100 |      100 |                |\r\n   bitcoin-net/lib/       |    52.11 |    34.26 |     46.9 |    52.29 |                |\r\n    bridge.js             |    43.94 |    33.33 |    33.33 |    29.27 |... 56,59,60,67 |\r\n    peer.js               |    59.38 |    42.07 |    63.27 |    60.36 |... 462,463,464 |\r\n    peerGroup.js          |       50 |    30.81 |    41.94 |     51.6 |... 537,538,540 |\r\n    protocolTransforms.js |    32.86 |     4.17 |       25 |    32.86 |... 103,115,116 |\r\n    utils.js              |    72.73 |    71.43 |    66.67 |       80 |          11,12 |\r\n  ------------------------|----------|----------|----------|----------|----------------|\r\n  All files               |    52.17 |    34.26 |     46.9 |    52.36 |                |\r\n  ------------------------|----------|----------|----------|----------|----------------|\r\n\r\nnot ok 21 no plan found\r\n⨯ fail  3\r\nnpm ERR! Test failed.  See above for more details.\r\n```"},"comment":{"url":"https://api.github.com/repos/mappum/bitcoin-net/issues/comments/237317143","html_url":"https://github.com/mappum/bitcoin-net/issues/54#issuecomment-237317143","issue_url":"https://api.github.com/repos/mappum/bitcoin-net/issues/54","id":237317143,"user":{"login":"mappum","id":398285,"avatar_url":"https://avatars.githubusercontent.com/u/398285?v=3","gravatar_id":"","url":"https://api.github.com/users/mappum","html_url":"https://github.com/mappum","followers_url":"https://api.github.com/users/mappum/followers","following_url":"https://api.github.com/users/mappum/following{/other_user}","gists_url":"https://api.github.com/users/mappum/gists{/gist_id}","starred_url":"https://api.github.com/users/mappum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mappum/subscriptions","organizations_url":"https://api.github.com/users/mappum/orgs","repos_url":"https://api.github.com/users/mappum/repos","events_url":"https://api.github.com/users/mappum/events{/privacy}","received_events_url":"https://api.github.com/users/mappum/received_events","type":"User","site_admin":false},"created_at":"2016-08-03T17:59:54Z","updated_at":"2016-08-03T17:59:54Z","body":"The tests aren't expected to work for testnet since they are hardcoded for mainnet blocks.\r\n\r\nIf you'd like to see the testnet params working, you can clone the [webcoin-bitcoin-testnet](https://github.com/mappum/webcoin-bitcoin-testnet) repo and run the tests."}}
{"actor":{"display_login":"mappum"}}