From dcb3a05a44393cdbebeae642c8dc27816eb84df7 Mon Sep 17 00:00:00 2001 From: Byron Hambly Date: Thu, 27 Jul 2023 16:04:07 +0200 Subject: [PATCH 1/2] lint: exclude src/secp256k1 from lint-python-utf8-encoding.sh It doesn't make sense to use this upstream linter for secp256k1-zkp. Currently this only affects musig2-vectors.py. --- test/lint/lint-python-utf8-encoding.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/lint/lint-python-utf8-encoding.sh b/test/lint/lint-python-utf8-encoding.sh index 6e5b18fc23d..7e5220715eb 100755 --- a/test/lint/lint-python-utf8-encoding.sh +++ b/test/lint/lint-python-utf8-encoding.sh @@ -9,7 +9,7 @@ export LC_ALL=C EXIT_CODE=0 -OUTPUT=$(git grep " open(" -- "*.py" ":(exclude)src/crc32c/" | grep -vE "encoding=.(ascii|utf8|utf-8)." | grep -vE "open\([^,]*, ['\"][^'\"]*b[^'\"]*['\"]") +OUTPUT=$(git grep " open(" -- "*.py" ":(exclude)src/crc32c/" ":(exclude)src/secp256k1/" | grep -vE "encoding=.(ascii|utf8|utf-8)." | grep -vE "open\([^,]*, ['\"][^'\"]*b[^'\"]*['\"]") if [[ ${OUTPUT} != "" ]]; then echo "Python's open(...) seems to be used to open text files without explicitly" echo "specifying encoding=\"utf8\":" From d9e021486f405d552d68c734d42a03a42a40a05f Mon Sep 17 00:00:00 2001 From: Byron Hambly Date: Thu, 27 Jul 2023 11:35:24 +0200 Subject: [PATCH 2/2] lint: fix codespell lint issues --- src/net_processing.cpp | 2 +- test/lint/lint-spelling.ignore-words.txt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/net_processing.cpp b/src/net_processing.cpp index c56cfc154a6..021e54d4b7e 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -2023,7 +2023,7 @@ void PeerManagerImpl::ProcessHeadersMessage(CNode& pfrom, const Peer& peer, if ((nodestate->pindexBestKnownBlock == nullptr) || (nodestate->pindexBestKnownBlock->nHeight < m_chainman.ActiveHeight())) { // Our notion of what blocks a peer has available is based on its pindexBestKnownBlock, - // which is based on headers recieved from it. If we don't have one, or it's too old, + // which is based on headers received from it. If we don't have one, or it's too old, // then we can never get blocks from this peer until we accept headers from it first. LogPrint(BCLog::NET, "NOT discarding headers from peer=%d, to update its block availability. (current best header %d, active chain height %d)\n", pfrom.GetId(), pindexBestHeader->nHeight, m_chainman.ActiveHeight()); } else { diff --git a/test/lint/lint-spelling.ignore-words.txt b/test/lint/lint-spelling.ignore-words.txt index e57949ac644..0d2be72d2a3 100644 --- a/test/lint/lint-spelling.ignore-words.txt +++ b/test/lint/lint-spelling.ignore-words.txt @@ -17,3 +17,5 @@ useable mut wit te +ligh +atack