Skip to content

Commit f20016d

Browse files
authored
Merge pull request #1252 from delta1/lint
lint: fix codespell and python utf8 encoding lint issues (redux)
2 parents c30f30b + d9e0214 commit f20016d

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

src/net_processing.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2023,7 +2023,7 @@ void PeerManagerImpl::ProcessHeadersMessage(CNode& pfrom, const Peer& peer,
20232023
if ((nodestate->pindexBestKnownBlock == nullptr) ||
20242024
(nodestate->pindexBestKnownBlock->nHeight < m_chainman.ActiveHeight())) {
20252025
// Our notion of what blocks a peer has available is based on its pindexBestKnownBlock,
2026-
// which is based on headers recieved from it. If we don't have one, or it's too old,
2026+
// which is based on headers received from it. If we don't have one, or it's too old,
20272027
// then we can never get blocks from this peer until we accept headers from it first.
20282028
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());
20292029
} else {

test/lint/lint-python-utf8-encoding.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
export LC_ALL=C
1111
EXIT_CODE=0
12-
OUTPUT=$(git grep " open(" -- "*.py" ":(exclude)src/crc32c/" | grep -vE "encoding=.(ascii|utf8|utf-8)." | grep -vE "open\([^,]*, ['\"][^'\"]*b[^'\"]*['\"]")
12+
OUTPUT=$(git grep " open(" -- "*.py" ":(exclude)src/crc32c/" ":(exclude)src/secp256k1/" | grep -vE "encoding=.(ascii|utf8|utf-8)." | grep -vE "open\([^,]*, ['\"][^'\"]*b[^'\"]*['\"]")
1313
if [[ ${OUTPUT} != "" ]]; then
1414
echo "Python's open(...) seems to be used to open text files without explicitly"
1515
echo "specifying encoding=\"utf8\":"

test/lint/lint-spelling.ignore-words.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@ useable
1717
mut
1818
wit
1919
te
20+
ligh
21+
atack

0 commit comments

Comments
 (0)