{"action":"closed","issue":{"url":"https://api.github.com/repos/bitcoin/bitcoin/issues/7745","repository_url":"https://api.github.com/repos/bitcoin/bitcoin","labels_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/7745/labels{/name}","comments_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/7745/comments","events_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/7745/events","html_url":"https://github.com/bitcoin/bitcoin/issues/7745","id":143519227,"number":7745,"title":"test: wallet reindex test has a race","user":{"login":"laanwj","id":126646,"avatar_url":"https://avatars.githubusercontent.com/u/126646?v=3","gravatar_id":"","url":"https://api.github.com/users/laanwj","html_url":"https://github.com/laanwj","followers_url":"https://api.github.com/users/laanwj/followers","following_url":"https://api.github.com/users/laanwj/following{/other_user}","gists_url":"https://api.github.com/users/laanwj/gists{/gist_id}","starred_url":"https://api.github.com/users/laanwj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laanwj/subscriptions","organizations_url":"https://api.github.com/users/laanwj/orgs","repos_url":"https://api.github.com/users/laanwj/repos","events_url":"https://api.github.com/users/laanwj/events{/privacy}","received_events_url":"https://api.github.com/users/laanwj/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bitcoin/bitcoin/labels/RPC","name":"RPC","color":"0052cc"},{"url":"https://api.github.com/repos/bitcoin/bitcoin/labels/Tests","name":"Tests","color":"d4c5f9"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-03-25T15:05:23Z","updated_at":"2016-03-29T07:33:25Z","closed_at":"2016-03-29T07:33:25Z","body":"It doesn't actually wait for the reindex to complete - so sometimes one gets this error, where there's no balance yet:\r\n```\r\ncheck -reindex\r\nAssertion failed: [Decimal('33.99911100'), Decimal('5649.99796160'), Decimal('59.99974800')] != [Decimal('33.99911100'), Decimal('5649.99796160'), Decimal('0E-8')]\r\n  File \"/data/src/bitcoin/qa/rpc-tests/test_framework/test_framework.py\", line 135, in main\r\n    self.run_test()\r\n  File \"./wallet.py\", line 296, in run_test\r\n    assert_equal(balance_nodes, [self.nodes[i].getbalance() for i in range(3)])\r\n  File \"/data/src/bitcoin/qa/rpc-tests/test_framework/util.py\", line 428, in assert_equal\r\n    raise AssertionError(\"%s != %s\"%(str(thing1),str(thing2)))\r\nStopping nodes\r\nCleaning up\r\nFailed\r\n```\r\nThe error is kind of rare as reindexing of the regtest chain is very fast.\r\nIt does seem to happen more after #7744, as it has less delay in the startup."}}