Skip to content

Commit

Permalink
Fix python tests start
Browse files Browse the repository at this point in the history
  • Loading branch information
timemarkovqtum committed Apr 26, 2024
1 parent b96db79 commit a31d9dc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion test/functional/test_framework/key.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def sign_ecdsa(self, msg, low_s=True, der_sig=True, rfc6979=False):
if der_sig:
return b'\x30' + bytes([4 + len(rb) + len(sb), 2, len(rb)]) + rb + bytes([2, len(sb)]) + sb
else:
v = R[1] & 1
v = int(R.y) & 1
v ^= high
return bytes([27 + v + (4 if self.compressed else 0)]) + r.to_bytes(32, 'big') + s.to_bytes(32, 'big')

Expand Down
4 changes: 2 additions & 2 deletions test/functional/test_framework/qtum.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ def generatesynchronized(node, numblocks, address=None, sync_with_nodes=[], mock
blockhashes = []
for i in range(0, max(numblocks//16, 0)):
blockhashes += node.generatetoaddress(16, address)
wait_until_helper(lambda: all(n.getbestblockhash() == node.getbestblockhash() for n in sync_with_nodes))
wait_until_helper_internal(lambda: all(n.getbestblockhash() == node.getbestblockhash() for n in sync_with_nodes))

# If more than 60 seconds elapses during the block generation, the nodes will disconnect since
# the inactivity check for networking mix mocked and non-mocked time.


if numblocks % 16:
blockhashes += node.generatetoaddress(numblocks % 16, address)
wait_until_helper(lambda: all(n.getbestblockhash() == node.getbestblockhash() for n in sync_with_nodes))
wait_until_helper_internal(lambda: all(n.getbestblockhash() == node.getbestblockhash() for n in sync_with_nodes))
return blockhashes

def generateinitial(node, numblocks, address=None, sync_with_nodes=[]):
Expand Down
4 changes: 2 additions & 2 deletions test/util/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ def bctest(testDir, testObj, buildenv):
"""
# Get the exec names and arguments
execprog = os.path.join(buildenv["BUILDDIR"], "src", testObj["exec"] + buildenv["EXEEXT"])
if testObj["exec"] == "./bitcoin-util":
if testObj["exec"] == "./qtum-util":
execprog = os.getenv("BITCOINUTIL", default=execprog)
elif testObj["exec"] == "./bitcoin-tx":
elif testObj["exec"] == "./qtum-tx":
execprog = os.getenv("BITCOINTX", default=execprog)

execargs = testObj['args']
Expand Down

0 comments on commit a31d9dc

Please sign in to comment.