-
Notifications
You must be signed in to change notification settings - Fork 91
Turns off staking in cfund-proposal-state-accept.py and other cfund tests #376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Turns off staking in cfund-proposal-state-accept.py and other cfund tests #376
Conversation
…posal' into fix-pr-payout-expired-proposal
|
Currently this test fails in Travis builds sometimes but not always. I tried running it locally and the test fails about 2/30 times. The test fails at line 158, Checking with print statements, when the test fails, the proposal status is I think the issue could be caused by:
|
|
have you tried printing getinfo() to check the block height? |
|
good idea. I will try and rerun the tests |
|
I re-ran the test 15 times and the block height is inconsistent by about ±1 block when staking is on. Indeed in some cases, there are 2 blocks with With staking off, the block height is consistent, which should fix this test failing. |
…ests (navcoin#376) * adds assert after try blocks and checks for preq creation during new state * fixes update of PENDING_VOTING_PREQ state * adds test to check accepted preq stay accepted * assigns cycle number variable based on cfundstats * adds print statements to debug in travis * adds staking(false) to all cfund tests, also comments out print statements * removes print statments
Currently cfund-proposal-state-accept fails in the last assert statement here:
The code loops in 1s increments while checking for a proposal's deadline before generating 1 block and asserting the status. I think an additional block may sometimes be generated between the deadline and assert, so there are actually two blocks generated with
status: "expired waiting for end of voting period"hence invalidating only one block will failassert(self.nodes[0].getproposal(proposalid0)["status"] == "accepted")sometimes.This PR:
Verifying this fix is hard because the test fails only sometimes. I tested locally and the revised test passed 20/20 times. I will look at this issue again if the test fails again.