{"action":"created","issue":{"url":"https://api.github.com/repos/ethereumjs/testrpc/issues/113","repository_url":"https://api.github.com/repos/ethereumjs/testrpc","labels_url":"https://api.github.com/repos/ethereumjs/testrpc/issues/113/labels{/name}","comments_url":"https://api.github.com/repos/ethereumjs/testrpc/issues/113/comments","events_url":"https://api.github.com/repos/ethereumjs/testrpc/issues/113/events","html_url":"https://github.com/ethereumjs/testrpc/issues/113","id":162796453,"number":113,"title":"Events not functioning as expected","user":{"login":"aakilfernandes","id":1577353,"avatar_url":"https://avatars.githubusercontent.com/u/1577353?v=3","gravatar_id":"","url":"https://api.github.com/users/aakilfernandes","html_url":"https://github.com/aakilfernandes","followers_url":"https://api.github.com/users/aakilfernandes/followers","following_url":"https://api.github.com/users/aakilfernandes/following{/other_user}","gists_url":"https://api.github.com/users/aakilfernandes/gists{/gist_id}","starred_url":"https://api.github.com/users/aakilfernandes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aakilfernandes/subscriptions","organizations_url":"https://api.github.com/users/aakilfernandes/orgs","repos_url":"https://api.github.com/users/aakilfernandes/repos","events_url":"https://api.github.com/users/aakilfernandes/events{/privacy}","received_events_url":"https://api.github.com/users/aakilfernandes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-06-28T21:52:53Z","updated_at":"2016-07-21T18:34:24Z","closed_at":null,"body":"## Expected Behavior\r\n`contractInstance.MyEvent({}, {fromBlock:0, toBlock:'latest'}).get(function(err, results){})` does not return results correctly\r\n\r\n## Current Behavior\r\nAlways returns empty results array\r\n\r\n## Steps to Reproduce (for bugs)\r\n1. Checkout out my `event-test` branch git@github.com:SafeMarket/testrpc.git#event-test\r\n2. Run npm test\r\n\r\n## Context\r\nThis is the relevant test case https://github.com/SafeMarket/testrpc/blob/event-test/test/requests.js#L531-L537"},"comment":{"url":"https://api.github.com/repos/ethereumjs/testrpc/issues/comments/234343347","html_url":"https://github.com/ethereumjs/testrpc/issues/113#issuecomment-234343347","issue_url":"https://api.github.com/repos/ethereumjs/testrpc/issues/113","id":234343347,"user":{"login":"tcoulter","id":92629,"avatar_url":"https://avatars.githubusercontent.com/u/92629?v=3","gravatar_id":"","url":"https://api.github.com/users/tcoulter","html_url":"https://github.com/tcoulter","followers_url":"https://api.github.com/users/tcoulter/followers","following_url":"https://api.github.com/users/tcoulter/following{/other_user}","gists_url":"https://api.github.com/users/tcoulter/gists{/gist_id}","starred_url":"https://api.github.com/users/tcoulter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tcoulter/subscriptions","organizations_url":"https://api.github.com/users/tcoulter/orgs","repos_url":"https://api.github.com/users/tcoulter/repos","events_url":"https://api.github.com/users/tcoulter/events{/privacy}","received_events_url":"https://api.github.com/users/tcoulter/received_events","type":"User","site_admin":false},"created_at":"2016-07-21T18:34:24Z","updated_at":"2016-07-21T18:34:24Z","body":"So apologies for the late response on this. I've written tests for events recently and they seem to work fine on the latest TestRPC. Please check my comment here: https://github.com/ethereumjs/testrpc/issues/118#issuecomment-232201066\n\nIt's likely that you're setting up your listener *after* the TestRPC mines a block. Thus, the TestRPC is exposing a race condition in your application you didn't know you had. Always set up your listener *before* making the transaction that fires the event.\n\nPlease reopen if you're still seeing this issue."}}
{"actor":{"display_login":"tcoulter"}}