-
Hi,
I don`t fully nderstand what is going wrong. I guess that somehow just the variable When i dig in etherscan, i see an internal transaction with all the eth from the contract to my account. I see an event with the RequestedRandomness, so untill there everything seems to work. I Wrote my own tests, they both pass:
Now i really have no idea why test_can_pick_winner doesn't pass... |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Seems the time.sleep(60) was to short... I learned a lot examining thi issue. Thanx again for this great course! |
Beta Was this translation helpful? Give feedback.
-
Here is a quick note for others reading this solution: I had exactly the same assertionError on this test. I tried @tsopanid solution - thanks for sharing by the way, but it didn't work. I spent quite some time increasing the sleep time in various increments and waiting for longer and longer (!) for the test to run, and all failed. So I went back and checked my code in some other places. The new element here was deploying to the Rinkeby testnet, as all unit test had passed. So I checked my config file and it turned out I had the wrong keyhash for Rinkeby. Once I changed it to the same as the one in the Github repo it passed straight away - with sleep set to 60 as well. So if you get this error at this stage try checking your settings for deployment to Rinkeby, including your .env variables, as well as your config :) Thanks also to @PatrickAlphaC for making such a great course! |
Beta Was this translation helpful? Give feedback.
Seems the time.sleep(60) was to short...
I tried with 180, now the test passed!
I learned a lot examining thi issue.
Having troubles sometimes can be fun :)
Thanx again for this great course!