Skip to content

Commit 6f157e4

Browse files
marcus290alex v
authored andcommitted
Turns off staking in cfund-proposal-state-accept.py and other cfund tests (#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
1 parent b2ed39a commit 6f157e4

12 files changed

+16
-19
lines changed

qa/rpc-tests/cfund-listproposals.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@ def run_test(self):
2525
# Get cfund parameters
2626
blocks_per_voting_cycle = self.nodes[0].cfundstats()["consensus"]["blocksPerVotingCycle"]
2727

28+
self.nodes[0].staking(False)
2829
activate_cfund(self.nodes[0])
29-
30-
# Donate to fund
3130
self.nodes[0].donatefund(100)
3231

3332
# Create proposals

qa/rpc-tests/cfund-paymentrequest-state-accept.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ def setup_network(self, split=False):
2121
self.is_network_split = split
2222

2323
def run_test(self):
24+
self.nodes[0].staking(False)
2425
activate_cfund(self.nodes[0])
2526
self.nodes[0].donatefund(100)
2627

qa/rpc-tests/cfund-paymentrequest-state-expired.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,8 @@ def setup_network(self, split=False):
2222
self.is_network_split = split
2323

2424
def run_test(self):
25-
# Make sure cfund is active
25+
self.nodes[0].staking(False)
2626
activate_cfund(self.nodes[0])
27-
28-
# Donate to the cfund
2927
self.nodes[0].donatefund(10)
3028

3129
# Create a proposal

qa/rpc-tests/cfund-paymentrequestvotelist.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def setup_network(self, split=False):
2121
self.is_network_split = split
2222

2323
def run_test(self):
24-
# Make sure cfund is active
24+
self.nodes[0].staking(False)
2525
activate_cfund(self.nodes[0])
2626
self.nodes[0].donatefund(1000)
2727

qa/rpc-tests/cfund-proposal-state-accept.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ def setup_network(self, split=False):
2121
self.is_network_split = split
2222

2323
def run_test(self):
24+
self.nodes[0].staking(False)
2425
activate_cfund(self.nodes[0])
2526

2627
proposal_duration = 3

qa/rpc-tests/cfund-proposal-state-expired.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ def setup_network(self, split=False):
2121
self.is_network_split = split
2222

2323
def run_test(self):
24+
self.nodes[0].staking(False)
2425
activate_cfund(self.nodes[0])
2526

2627
# Create proposal

qa/rpc-tests/cfund-proposalvotelist.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def setup_network(self, split=False):
2121
self.is_network_split = split
2222

2323
def run_test(self):
24-
# Make sure cfund is active
24+
self.nodes[0].staking(False)
2525
activate_cfund(self.nodes[0])
2626
self.nodes[0].donatefund(1000)
2727

qa/rpc-tests/cfund-rawtx-create-proposal.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def setup_network(self, split=False):
3030
self.is_network_split = split
3131

3232
def run_test(self):
33+
self.nodes[0].staking(False)
3334
activate_cfund(self.nodes[0])
3435

3536
# creates a good proposal and sets things we use later
@@ -120,7 +121,7 @@ def test_invalid_proposal(self, address, amount, duration, description):
120121
callSucceed = False
121122
try:
122123
proposal = self.send_raw_proposalrequest(address, amount, duration, description)
123-
print(proposal)
124+
#print(proposal)
124125
callSucceed = True
125126
except :
126127
pass
@@ -146,8 +147,8 @@ def test_valid_description(self, descriptionTxt, proposal_list_len):
146147
propHash = ""
147148
callSucceed = True
148149

149-
print("Test Description: -------------------------")
150-
print(descriptionTxt)
150+
#print("Test Description: -------------------------")
151+
#print(descriptionTxt)
151152
try:
152153
propHash = self.send_raw_proposalrequest(self.goodAddress, self.goodAmount, self.goodDuration, descriptionTxt)
153154
#print(propHash)

qa/rpc-tests/cfund-rawtx-paymentrequest-create.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,8 @@ def setup_network(self, split=False):
2828
self.is_network_split = split
2929

3030
def run_test(self):
31-
# Make sure cfund is active
31+
self.nodes[0].staking(False)
3232
activate_cfund(self.nodes[0])
33-
34-
# Donate to the cfund
3533
self.nodes[0].donatefund(100)
3634

3735
# Get address

qa/rpc-tests/cfund-rawtx-paymentrequest-vote.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,8 @@ def setup_network(self, split=False):
2020
self.is_network_split = split
2121

2222
def run_test(self):
23-
# Make sure cfund is active
23+
self.nodes[0].staking(False)
2424
activate_cfund(self.nodes[0])
25-
26-
# Donate to the cfund
2725
self.nodes[0].donatefund(100)
2826

2927
# Get address

0 commit comments

Comments
 (0)