Skip to content

Commit dfef6b6

Browse files
author
MarcoFalke
committed
Merge #10047: [tests] Remove unused variables and imports
3897459 [tests] Remove unused variables (practicalswift) 72163d4 [tests] Remove unused and duplicate imports (practicalswift) Tree-SHA512: 926af14b844bfca3bdd08b3cfdcb0edd3652efb4612d5571fee9abb917a6ce4e7d11d3601ff9c3d017e943ebe1e9ebdfccaf0af3db84d201b61941e9c1c9146a
2 parents 3568b30 + 3897459 commit dfef6b6

File tree

11 files changed

+6
-16
lines changed

11 files changed

+6
-16
lines changed

contrib/testgen/gen_base58_test_vectors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# Released under MIT License
1414
import os
1515
from itertools import islice
16-
from base58 import b58encode, b58decode, b58encode_chk, b58decode_chk, b58chars
16+
from base58 import b58encode_chk, b58decode_chk, b58chars
1717
import random
1818
from binascii import b2a_hex
1919

test/functional/bip68-sequence.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,8 @@ def activateCSV(self):
378378
# activation should happen at block height 432 (3 periods)
379379
min_activation_height = 432
380380
height = self.nodes[0].getblockcount()
381-
assert(height < 432)
382-
self.nodes[0].generate(432-height)
381+
assert(height < min_activation_height)
382+
self.nodes[0].generate(min_activation_height-height)
383383
assert(get_bip9_status(self.nodes[0], 'csv')['status'] == 'active')
384384
sync_blocks(self.nodes)
385385

test/functional/fundrawtransaction.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,6 @@ def run_test(self):
691691

692692
inputs = []
693693
outputs = {self.nodes[2].getnewaddress(): value for value in (1.0, 1.1, 1.2, 1.3)}
694-
keys = list(outputs.keys())
695694
rawtx = self.nodes[3].createrawtransaction(inputs, outputs)
696695

697696
result = [self.nodes[3].fundrawtransaction(rawtx),

test/functional/import-rescan.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
from test_framework.authproxy import JSONRPCException
2323
from test_framework.test_framework import BitcoinTestFramework
2424
from test_framework.util import (start_nodes, connect_nodes, sync_blocks, assert_equal, set_node_times)
25-
from decimal import Decimal
2625

2726
import collections
2827
import enum

test/functional/multi_rpc.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,9 @@ def run_test(self):
4141
authpair = url.username + ':' + url.password
4242

4343
#New authpair generated via share/rpcuser tool
44-
rpcauth = "rpcauth=rt:93648e835a54c573682c2eb19f882535$7681e9c5b74bdd85e78166031d2058e1069b3ed7ed967c93fc63abba06f31144"
4544
password = "cA773lm788buwYe4g4WT+05pKyNruVKjQ25x3n0DQcM="
4645

4746
#Second authpair with different username
48-
rpcauth2 = "rpcauth=rt2:f8607b1a88861fac29dfccf9b52ff9f$ff36a0c23c8c62b4846112e50fa888416e94c17bfd4c42f88fd8f55ec6a3137e"
4947
password2 = "8/F3uMDw4KSEbw96U3CA1C4X05dkHDN2BPFjTgZW4KI="
5048
authpairnew = "rt:"+password
5149

test/functional/rawtransactions.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ def run_test(self):
104104
txId = self.nodes[0].sendtoaddress(mSigObj, 2.2)
105105
decTx = self.nodes[0].gettransaction(txId)
106106
rawTx = self.nodes[0].decoderawtransaction(decTx['hex'])
107-
sPK = rawTx['vout'][0]['scriptPubKey']['hex']
108107
self.sync_all()
109108
self.nodes[0].generate(1)
110109
self.sync_all()

test/functional/segwit.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@
66

77
from test_framework.test_framework import BitcoinTestFramework
88
from test_framework.util import *
9-
from test_framework.mininode import sha256, ripemd160, CTransaction, CTxIn, COutPoint, CTxOut, COIN
9+
from test_framework.mininode import sha256, CTransaction, CTxIn, COutPoint, CTxOut, COIN, ToHex, FromHex
1010
from test_framework.address import script_to_p2sh, key_to_p2pkh
11-
from test_framework.script import CScript, OP_HASH160, OP_CHECKSIG, OP_0, hash160, OP_EQUAL, OP_DUP, OP_EQUALVERIFY, OP_1, OP_2, OP_CHECKMULTISIG, hash160, OP_TRUE
11+
from test_framework.script import CScript, OP_HASH160, OP_CHECKSIG, OP_0, hash160, OP_EQUAL, OP_DUP, OP_EQUALVERIFY, OP_1, OP_2, OP_CHECKMULTISIG, OP_TRUE
1212
from io import BytesIO
13-
from test_framework.mininode import ToHex, FromHex, COIN
1413

1514
NODE_0 = 0
1615
NODE_1 = 1

test/functional/smartfees.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@
44
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
55
"""Test fee estimation code."""
66

7-
from collections import OrderedDict
87
from test_framework.test_framework import BitcoinTestFramework
98
from test_framework.util import *
109
from test_framework.script import CScript, OP_1, OP_DROP, OP_2, OP_HASH160, OP_EQUAL, hash160, OP_TRUE
11-
from test_framework.mininode import CTransaction, CTxIn, CTxOut, COutPoint, ToHex, FromHex, COIN
10+
from test_framework.mininode import CTransaction, CTxIn, CTxOut, COutPoint, ToHex, COIN
1211

1312
# Construct 2 trivial P2SH's and the ScriptSigs that spend them
1413
# So we can create many many transactions without needing to spend

test/functional/test_framework/socks5.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"""Dummy Socks5 server for testing."""
66

77
import socket, threading, queue
8-
import traceback, sys
98
import logging
109

1110
logger = logging.getLogger("TestFramework.socks5")

test/functional/test_framework/test_framework.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import shutil
1212
import tempfile
1313
import time
14-
import traceback
1514

1615
from .util import (
1716
initialize_chain,

0 commit comments

Comments
 (0)