Skip to content

Commit

Permalink
Fix failing tests
Browse files Browse the repository at this point in the history
Signed-off-by: Mihai Ciumeica <mihai@thirdhash.com>
  • Loading branch information
cmihai committed Apr 10, 2019
1 parent 491de61 commit 3335689
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/functional/finalization_slash_itself.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ def test_double_votes(self):
txid1 = finalizer1.deposit(addr, 1500)
wait_until(lambda: txid1 in fork1.getrawmempool())

finalizer2.setaccount(addr, '')
txid2 = finalizer2.deposit(addr, 1500)
assert_equal(txid1, txid2)
connect_nodes(fork1, finalizer2.index)
Expand Down Expand Up @@ -127,7 +126,7 @@ def test_double_votes(self):
'validators': 1})

# Send the conflicting vote from the other chain to finalizer2, it should record it and slash it later
assert_raises_rpc_error(-26, " bad-vote-invalid-state", finalizer2.sendrawtransaction, raw_vote_1)
assert_raises_rpc_error(-26, "bad-vote-invalid-state", finalizer2.sendrawtransaction, raw_vote_1)

fork2.generatetoaddress(1, fork2.getnewaddress('', 'bech32'))
self.wait_for_vote_and_disconnect(finalizer=finalizer2, node=fork2)
Expand Down Expand Up @@ -161,7 +160,7 @@ def test_double_votes(self):

self.wait_for_vote_and_disconnect(finalizer=finalizer2, node=fork2)

assert_raises_rpc_error(-26, " bad-vote-invalid-state", finalizer2.sendrawtransaction, raw_vote_2)
assert_raises_rpc_error(-26, "bad-vote-invalid-state", finalizer2.sendrawtransaction, raw_vote_2)

# The vote hasn't been replaces by a slash
vote = finalizer2.decoderawtransaction(finalizer2.getrawtransaction(finalizer2.getrawmempool()[0]))
Expand Down
1 change: 1 addition & 0 deletions test/functional/test_framework/blocktools.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
TxType,
UTXO,
msg_block,
msg_witness_block,
ser_uint256,
ser_vector,
sha256,
Expand Down

0 comments on commit 3335689

Please sign in to comment.