Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/lint/04_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ python3 --version
# NOTE: BUMP ALSO contrib/containers/ci/ci-slim.Dockerfile
${CI_RETRY_EXE} pip3 install \
codespell==2.2.1 \
flake8==5.0.4 \
flake8==6.1.0 \
lief==0.13.2 \
mypy==0.981 \
pyzmq==24.0.1 \
Expand Down
2 changes: 1 addition & 1 deletion contrib/containers/ci/ci-slim.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ ENV UV_SYSTEM_PYTHON=1
# NOTE: if versions are changed, update ci/lint/04_install.sh
RUN uv pip install --system --break-system-packages \
codespell==2.2.1 \
flake8==5.0.4 \
flake8==6.1.0 \
jinja2 \
lief==0.13.2 \
mypy==0.981 \
Expand Down
2 changes: 1 addition & 1 deletion src/test/fuzz/descriptor_parse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class MockedDescriptorConverter {
std::string desc;
desc.reserve(mocked_desc.size());

// Replace all occurences of '%' followed by two hex characters with the corresponding key.
// Replace all occurrences of '%' followed by two hex characters with the corresponding key.
for (size_t i = 0; i < mocked_desc.size();) {
if (mocked_desc[i] == '%') {
if (i + 3 >= mocked_desc.size()) return {};
Expand Down
3 changes: 1 addition & 2 deletions test/functional/feature_governance.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from test_framework.messages import uint256_to_string
from test_framework.test_framework import (
DashTestFramework,
MasternodeInfo,
)
from test_framework.governance import have_trigger_for_height, prepare_object
from test_framework.util import assert_equal, satoshi_round
Expand Down Expand Up @@ -195,7 +194,7 @@ def run_test(self):
_, mn_payee_protx = height_protx_list[1]

payee_idx = None
for mn in self.mninfo: # type: MasternodeInfo
for mn in self.mninfo:
if mn.proTxHash == mn_payee_protx:
payee_idx = mn.nodeIdx
break
Expand Down
11 changes: 5 additions & 6 deletions test/functional/feature_llmq_connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

from test_framework.test_framework import (
DashTestFramework,
MasternodeInfo,
)
from test_framework.util import assert_greater_than_or_equal

Expand Down Expand Up @@ -86,7 +85,7 @@ def run_test(self):

self.log.info("check that old masternode connections are dropped")
removed = False
for mn in self.mninfo: # type: MasternodeInfo
for mn in self.mninfo:
if len(mn.get_node(self).quorum("memberof", mn.proTxHash)) > 0:
try:
with mn.get_node(self).assert_debug_log(['removing masternodes quorum connections']):
Expand All @@ -102,7 +101,7 @@ def run_test(self):

self.log.info("check that inter-quorum masternode connections are added")
added = False
for mn in self.mninfo: # type: MasternodeInfo
for mn in self.mninfo:
if len(mn.get_node(self).quorum("memberof", mn.proTxHash)) > 0:
try:
with mn.get_node(self).assert_debug_log(['adding mn inter-quorum connections']):
Expand All @@ -116,11 +115,11 @@ def run_test(self):

def check_reconnects(self, expected_connection_count):
self.log.info("disable and re-enable networking on all masternodes")
for mn in self.mninfo: # type: MasternodeInfo
for mn in self.mninfo:
mn.get_node(self).setnetworkactive(False)
for mn in self.mninfo: # type: MasternodeInfo
for mn in self.mninfo:
self.wait_until(lambda: len(mn.get_node(self).getpeerinfo()) == 0)
for mn in self.mninfo: # type: MasternodeInfo
for mn in self.mninfo:
mn.get_node(self).setnetworkactive(True)
self.bump_mocktime(60)

Expand Down
3 changes: 1 addition & 2 deletions test/functional/feature_llmq_singlenode.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
from test_framework.authproxy import JSONRPCException
from test_framework.test_framework import (
DashTestFramework,
MasternodeInfo,
)
from test_framework.util import (
assert_raises_rpc_error,
Expand Down Expand Up @@ -43,7 +42,7 @@ def check_sigs(self, hasrecsigs, isconflicting1, isconflicting2):
conflicting_1 = False
conflicting_2 = False

for mn in self.mninfo: # type: MasternodeInfo
for mn in self.mninfo:
if mn.get_node(self).quorum("hasrecsig", q_type, id, msgHash):
has_sig = True
if mn.get_node(self).quorum("isconflicting", q_type, id, msgHash):
Expand Down
3 changes: 1 addition & 2 deletions test/functional/feature_mnehf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

from test_framework.test_framework import (
DashTestFramework,
MasternodeInfo
)
from test_framework.util import (
assert_equal,
Expand All @@ -44,7 +43,7 @@ def restart_all_nodes(self, params=None):
self.log.info(f"Actual restart options: {self.extra_args[inode]}")

self.restart_node(0)
for mn in self.mninfo: # type: MasternodeInfo
for mn in self.mninfo:
index = mn.nodeIdx
self.stop_node(index)
self.start_masternode(mn)
Expand Down
3 changes: 1 addition & 2 deletions test/functional/interface_zmq_dash.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

from test_framework.test_framework import (
DashTestFramework,
MasternodeInfo,
)
from test_framework.p2p import P2PInterface
from test_framework.util import (
Expand Down Expand Up @@ -225,7 +224,7 @@ def validate_recovered_sig(request_id, msg_hash):
sign_id = uint256_to_string(random.getrandbits(256))
sign_msg_hash = uint256_to_string(random.getrandbits(256))
quorumHash = self.nodes[0].quorum("selectquorum", 100, sign_id)["quorumHash"]
for mn in self.get_quorum_masternodes(quorumHash): # type: MasternodeInfo
for mn in self.get_quorum_masternodes(quorumHash):
mn.get_node(self).quorum("sign", 100, sign_id, sign_msg_hash)
validate_recovered_sig(sign_id, sign_msg_hash)
# Unsubscribe from recovered signature messages
Expand Down
2 changes: 1 addition & 1 deletion test/functional/p2p_invalid_locator.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def run_test(self):
within_max_peer = node.add_p2p_connection(P2PInterface())
msg.locator.vHave = [int(node.getblockhash(i - 1), 16) for i in range(block_count, block_count - (MAX_LOCATOR_SZ), -1)]
within_max_peer.send_message(msg)
if type(msg) == msg_getheaders:
if type(msg) is msg_getheaders:
within_max_peer.wait_for_header(node.getbestblockhash())
else:
within_max_peer.wait_for_block(int(node.getbestblockhash(), 16))
Expand Down
4 changes: 2 additions & 2 deletions test/functional/test_framework/crypto/siphash.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def siphash_round(v0, v1, v2, v3):


def siphash(k0, k1, data):
assert type(data) == bytes
assert type(data) is bytes
v0 = 0x736f6d6570736575 ^ k0
v1 = 0x646f72616e646f6d ^ k1
v2 = 0x6c7967656e657261 ^ k0
Expand Down Expand Up @@ -61,5 +61,5 @@ def siphash(k0, k1, data):


def siphash256(k0, k1, num):
assert type(num) == int
assert type(num) is int
return siphash(k0, k1, num.to_bytes(32, 'little'))
Loading