{"action":"created","issue":{"url":"https://api.github.com/repos/CounterpartyXCP/counterpartyd/issues/596","labels_url":"https://api.github.com/repos/CounterpartyXCP/counterpartyd/issues/596/labels{/name}","comments_url":"https://api.github.com/repos/CounterpartyXCP/counterpartyd/issues/596/comments","events_url":"https://api.github.com/repos/CounterpartyXCP/counterpartyd/issues/596/events","html_url":"https://github.com/CounterpartyXCP/counterpartyd/issues/596","id":53407529,"number":596,"title":"Global 'CURRENT_BLOCK_INDEX' variable?","user":{"login":"adamkrellenstein","id":6189829,"avatar_url":"https://avatars.githubusercontent.com/u/6189829?v=3","gravatar_id":"","url":"https://api.github.com/users/adamkrellenstein","html_url":"https://github.com/adamkrellenstein","followers_url":"https://api.github.com/users/adamkrellenstein/followers","following_url":"https://api.github.com/users/adamkrellenstein/following{/other_user}","gists_url":"https://api.github.com/users/adamkrellenstein/gists{/gist_id}","starred_url":"https://api.github.com/users/adamkrellenstein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamkrellenstein/subscriptions","organizations_url":"https://api.github.com/users/adamkrellenstein/orgs","repos_url":"https://api.github.com/users/adamkrellenstein/repos","events_url":"https://api.github.com/users/adamkrellenstein/events{/privacy}","received_events_url":"https://api.github.com/users/adamkrellenstein/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/CounterpartyXCP/counterpartyd/labels/elegance","name":"elegance","color":"5319e7"},{"url":"https://api.github.com/repos/CounterpartyXCP/counterpartyd/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-01-05T15:32:19Z","updated_at":"2015-01-06T14:37:00Z","closed_at":null,"body":"Instead of passing around `block_index` from `tx['block_index']`, we could just use a global variable that is the index of the block currently being parsed. This would be distinct from `util.last_block(db)['block_index']` which is the last block index in the database.\r\n\r\n<bountysource-plugin>\r\n\r\n---\r\nWant to back this issue? **[Place a bounty on it!](https://www.bountysource.com/issues/7498449-global-current_block_index-variable?utm_campaign=plugin&utm_content=tracker%2F494307&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F494307&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/CounterpartyXCP/counterpartyd/issues/comments/68872391","html_url":"https://github.com/CounterpartyXCP/counterpartyd/issues/596#issuecomment-68872391","issue_url":"https://api.github.com/repos/CounterpartyXCP/counterpartyd/issues/596","id":68872391,"user":{"login":"adamkrellenstein","id":6189829,"avatar_url":"https://avatars.githubusercontent.com/u/6189829?v=3","gravatar_id":"","url":"https://api.github.com/users/adamkrellenstein","html_url":"https://github.com/adamkrellenstein","followers_url":"https://api.github.com/users/adamkrellenstein/followers","following_url":"https://api.github.com/users/adamkrellenstein/following{/other_user}","gists_url":"https://api.github.com/users/adamkrellenstein/gists{/gist_id}","starred_url":"https://api.github.com/users/adamkrellenstein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamkrellenstein/subscriptions","organizations_url":"https://api.github.com/users/adamkrellenstein/orgs","repos_url":"https://api.github.com/users/adamkrellenstein/repos","events_url":"https://api.github.com/users/adamkrellenstein/events{/privacy}","received_events_url":"https://api.github.com/users/adamkrellenstein/received_events","type":"User","site_admin":false},"created_at":"2015-01-06T14:37:00Z","updated_at":"2015-01-06T14:37:00Z","body":"This will make it harder to do conditional tests based on block index? At least, we'll have to add support to the test suite for changing `CURRENT_BLOCK_INDEX`."}}