{"action":"created","issue":{"url":"https://api.github.com/repos/alecalve/python-bitcoin-blockchain-parser/issues/36","repository_url":"https://api.github.com/repos/alecalve/python-bitcoin-blockchain-parser","labels_url":"https://api.github.com/repos/alecalve/python-bitcoin-blockchain-parser/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/alecalve/python-bitcoin-blockchain-parser/issues/36/comments","events_url":"https://api.github.com/repos/alecalve/python-bitcoin-blockchain-parser/issues/36/events","html_url":"https://github.com/alecalve/python-bitcoin-blockchain-parser/pull/36","id":300442020,"number":36,"title":"Add protections to not attempt to parse new blocks before they are ready","user":{"login":"brannondorsey","id":3193533,"avatar_url":"https://avatars1.githubusercontent.com/u/3193533?v=4","gravatar_id":"","url":"https://api.github.com/users/brannondorsey","html_url":"https://github.com/brannondorsey","followers_url":"https://api.github.com/users/brannondorsey/followers","following_url":"https://api.github.com/users/brannondorsey/following{/other_user}","gists_url":"https://api.github.com/users/brannondorsey/gists{/gist_id}","starred_url":"https://api.github.com/users/brannondorsey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brannondorsey/subscriptions","organizations_url":"https://api.github.com/users/brannondorsey/orgs","repos_url":"https://api.github.com/users/brannondorsey/repos","events_url":"https://api.github.com/users/brannondorsey/events{/privacy}","received_events_url":"https://api.github.com/users/brannondorsey/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-26T23:55:22Z","updated_at":"2018-02-26T23:55:23Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/alecalve/python-bitcoin-blockchain-parser/pulls/36","html_url":"https://github.com/alecalve/python-bitcoin-blockchain-parser/pull/36","diff_url":"https://github.com/alecalve/python-bitcoin-blockchain-parser/pull/36.diff","patch_url":"https://github.com/alecalve/python-bitcoin-blockchain-parser/pull/36.patch"},"body":"Parsing the very latest blocks, `get_ordered_blocks(...)` error with block indexes having values `-1` for `index.file` and `index.data_pos`. This will result in an `Error: file not found.` error. Add a check to prevent this from happening. I'm not entirely sure why this is, but it only seems to happen for the very top 1-3 blocks that were received by a live running node (perhaps because they are so new and haven't been confirmed?). These `-1` values are being set [here](https://github.com/brangerbriz/python-bitcoin-blockchain-parser/blob/master/blockchain_parser/index.py#L39-L49)."},"comment":{"url":"https://api.github.com/repos/alecalve/python-bitcoin-blockchain-parser/issues/comments/368694341","html_url":"https://github.com/alecalve/python-bitcoin-blockchain-parser/pull/36#issuecomment-368694341","issue_url":"https://api.github.com/repos/alecalve/python-bitcoin-blockchain-parser/issues/36","id":368694341,"user":{"login":"pep8speaks","id":24736507,"avatar_url":"https://avatars1.githubusercontent.com/u/24736507?v=4","gravatar_id":"","url":"https://api.github.com/users/pep8speaks","html_url":"https://github.com/pep8speaks","followers_url":"https://api.github.com/users/pep8speaks/followers","following_url":"https://api.github.com/users/pep8speaks/following{/other_user}","gists_url":"https://api.github.com/users/pep8speaks/gists{/gist_id}","starred_url":"https://api.github.com/users/pep8speaks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pep8speaks/subscriptions","organizations_url":"https://api.github.com/users/pep8speaks/orgs","repos_url":"https://api.github.com/users/pep8speaks/repos","events_url":"https://api.github.com/users/pep8speaks/events{/privacy}","received_events_url":"https://api.github.com/users/pep8speaks/received_events","type":"User","site_admin":false},"created_at":"2018-02-26T23:55:23Z","updated_at":"2018-02-26T23:55:23Z","author_association":"NONE","body":"Hello @brannondorsey! Thanks for submitting the PR.\n\n - In the file [`blockchain_parser/blockchain.py`](https://github.com/alecalve/python-bitcoin-blockchain-parser/blob/62ec3d4b3472d55a5fc31bd446451294f1783368/blockchain_parser/blockchain.py), following are the PEP8 issues :\n\n> [Line 66:1](https://github.com/alecalve/python-bitcoin-blockchain-parser/blob/62ec3d4b3472d55a5fc31bd446451294f1783368/blockchain_parser/blockchain.py#L66): [E302](https://duckduckgo.com/?q=pep8%20E302) expected 2 blank lines, found 1\n> [Line 69:27](https://github.com/alecalve/python-bitcoin-blockchain-parser/blob/62ec3d4b3472d55a5fc31bd446451294f1783368/blockchain_parser/blockchain.py#L69): [E261](https://duckduckgo.com/?q=pep8%20E261) at least two spaces before inline comment\n> [Line 100:21](https://github.com/alecalve/python-bitcoin-blockchain-parser/blob/62ec3d4b3472d55a5fc31bd446451294f1783368/blockchain_parser/blockchain.py#L100): [E128](https://duckduckgo.com/?q=pep8%20E128) continuation line under-indented for visual indent\n> [Line 102:39](https://github.com/alecalve/python-bitcoin-blockchain-parser/blob/62ec3d4b3472d55a5fc31bd446451294f1783368/blockchain_parser/blockchain.py#L102): [E251](https://duckduckgo.com/?q=pep8%20E251) unexpected spaces around keyword / parameter equals\n> [Line 102:41](https://github.com/alecalve/python-bitcoin-blockchain-parser/blob/62ec3d4b3472d55a5fc31bd446451294f1783368/blockchain_parser/blockchain.py#L102): [E251](https://duckduckgo.com/?q=pep8%20E251) unexpected spaces around keyword / parameter equals\n\n"}}
{"actor":{"display_login":"pep8speaks"}}