From 07aebbf505f43b7a8bc296eaa18314e19024cae2 Mon Sep 17 00:00:00 2001 From: Byron Hambly Date: Fri, 14 Feb 2025 15:03:46 +0200 Subject: [PATCH] lint: fixes --- contrib/merge-prs.sh | 2 +- src/net_processing.cpp | 4 ++-- src/wallet/wallet.cpp | 1 - test/functional/rpc_psbt.py | 24 ++++++++++++------------ test/functional/rpc_scanblocks.py | 12 ++++++------ 5 files changed, 21 insertions(+), 22 deletions(-) diff --git a/contrib/merge-prs.sh b/contrib/merge-prs.sh index 7e322a0f8b..e3b8e1696a 100755 --- a/contrib/merge-prs.sh +++ b/contrib/merge-prs.sh @@ -135,7 +135,7 @@ do PR_ID_ALT=$(echo "$line" | cut -d ' ' -f 8 | tr -d :) if [[ "$PR_ID" == "pull" ]]; then - PR_ID="${PR_ID_ALT}" + PR_ID="${PR_ID_ALT}" fi echo -e "$CHAIN PR \e[37m$PR_ID \e[33m$HASH\e[0m on \e[32m$DATE\e[0m " diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 82b8242e92..2aecabd26f 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -2718,7 +2718,7 @@ void PeerManagerImpl::UpdatePeerStateForReceivedHeaders(CNode& pfrom, // This peer has too little work on their headers chain to help // us sync -- disconnect if it is an outbound disconnection // candidate. - // Note: We compare their tip to the minumum chain work (rather than + // Note: We compare their tip to the minimum chain work (rather than // m_chainman.ActiveChain().Tip()) because we won't start block download // until we have a headers chain that has at least // the minimum chain work, even if a peer has a chain past our tip, @@ -3954,7 +3954,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type, // Note that if we were to be on a chain that forks from the checkpointed // chain, then serving those headers to a peer that has seen the // checkpointed chain would cause that peer to disconnect us. Requiring - // that our chainwork exceed the mimimum chain work is a protection against + // that our chainwork exceed the minimum chain work is a protection against // being fed a bogus chain when we started up for the first time and // getting partitioned off the honest network for serving that chain to // others. diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 1408e3c9a2..274a2fa976 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -53,7 +53,6 @@ #include #include #include -#include using interfaces::FoundBlock; diff --git a/test/functional/rpc_psbt.py b/test/functional/rpc_psbt.py index f477d48d4f..9a80e12854 100755 --- a/test/functional/rpc_psbt.py +++ b/test/functional/rpc_psbt.py @@ -19,18 +19,18 @@ from test_framework.messages import ( WITNESS_SCALE_FACTOR, ser_compact_size, ) -from test_framework.psbt import ( - PSBT, - # PSBTMap, - # PSBT_GLOBAL_UNSIGNED_TX, - # PSBT_IN_RIPEMD160, - # PSBT_IN_SHA256, - # PSBT_IN_HASH160, - # PSBT_IN_HASH256, - # PSBT_IN_WITNESS_UTXO, - PSBT_OUT_TAP_TREE, -) -from test_framework.script import CScript, OP_TRUE +# from test_framework.psbt import ( +# PSBT, +# PSBTMap, +# PSBT_GLOBAL_UNSIGNED_TX, +# PSBT_IN_RIPEMD160, +# PSBT_IN_SHA256, +# PSBT_IN_HASH160, +# PSBT_IN_HASH256, +# PSBT_IN_WITNESS_UTXO, +# PSBT_OUT_TAP_TREE, +# ) +# from test_framework.script import CScript, OP_TRUE from test_framework.test_framework import BitcoinTestFramework from test_framework.util import ( # assert_approx, diff --git a/test/functional/rpc_scanblocks.py b/test/functional/rpc_scanblocks.py index ee5ce4ae7b..88d9593df3 100755 --- a/test/functional/rpc_scanblocks.py +++ b/test/functional/rpc_scanblocks.py @@ -3,10 +3,10 @@ # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the scanblocks RPC call.""" -from test_framework.blockfilter import ( - bip158_basic_element_hash, - bip158_relevant_scriptpubkeys, -) +# from test_framework.blockfilter import ( +# bip158_basic_element_hash, +# bip158_relevant_scriptpubkeys, +# ) from test_framework.messages import COIN from test_framework.test_framework import BitcoinTestFramework from test_framework.util import ( @@ -81,9 +81,9 @@ class ScanblocksTest(BitcoinTestFramework): # finding a false-positive at runtime would take too long, hence we simply # use a pre-calculated one that collides with the regtest genesis block's # coinbase output and verify that their BIP158 ranged hashes match - genesis_blockhash = node.getblockhash(0) - genesis_spks = bip158_relevant_scriptpubkeys(node, genesis_blockhash) # ELEMENTS: FIXME + # genesis_blockhash = node.getblockhash(0) + # genesis_spks = bip158_relevant_scriptpubkeys(node, genesis_blockhash) # assert_equal(len(genesis_spks), 1) # genesis_coinbase_spk = list(genesis_spks)[0] # false_positive_spk = bytes.fromhex("001400000000000000000000000000000000000cadcb")