Skip to content

Commit ac4a095

Browse files
Remove unused Python variables
1 parent 5754e03 commit ac4a095

File tree

7 files changed

+2
-8
lines changed

7 files changed

+2
-8
lines changed

contrib/testgen/base58.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ def b58decode_chk(v):
8484
result = b58decode(v)
8585
if result is None:
8686
return None
87-
h3 = checksum(result[:-4])
8887
if result[-4:] == checksum(result[:-4]):
8988
return result[:-4]
9089
else:

contrib/testgen/gen_base58_test_vectors.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ def is_valid(v):
4545
result = b58decode_chk(v)
4646
if result is None:
4747
return False
48-
valid = False
4948
for template in templates:
5049
prefix = str(bytearray(template[0]))
5150
suffix = str(bytearray(template[2]))

qa/rpc-tests/forknotify.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def __init__(self):
2222
def setup_network(self):
2323
self.nodes = []
2424
self.alert_filename = os.path.join(self.options.tmpdir, "alert.txt")
25-
with open(self.alert_filename, 'w', encoding='utf8') as f:
25+
with open(self.alert_filename, 'w', encoding='utf8'):
2626
pass # Just open then close to create zero-length file
2727
self.nodes.append(start_node(0, self.options.tmpdir,
2828
["-blockversion=2", "-alertnotify=echo %s >> \"" + self.alert_filename + "\""]))

qa/rpc-tests/p2p-segwit.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,6 @@ def test_tx_relay_after_segwit_activation(self):
951951
tx.rehash()
952952

953953
tx_hash = tx.sha256
954-
tx_value = tx.vout[0].nValue
955954

956955
# Verify that unnecessary witnesses are rejected.
957956
self.test_node.announce_tx_and_wait_for_getdata(tx)

qa/rpc-tests/receivedby.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ def get_sub_array_from_array(object_array, to_match):
1414
Finds and returns a sub array from an array of arrays.
1515
to_match should be a unique idetifier of a sub array
1616
'''
17-
num_matched = 0
1817
for item in object_array:
1918
all_match = True
2019
for key,value in to_match.items():
@@ -104,7 +103,7 @@ def run_test(self):
104103
received_by_account_json = get_sub_array_from_array(self.nodes[1].listreceivedbyaccount(),{"account":account})
105104
if len(received_by_account_json) == 0:
106105
raise AssertionError("No accounts found in node")
107-
balance_by_account = rec_by_accountArr = self.nodes[1].getreceivedbyaccount(account)
106+
balance_by_account = self.nodes[1].getreceivedbyaccount(account)
108107

109108
txid = self.nodes[0].sendtoaddress(addr, 0.1)
110109
self.sync_all()

qa/rpc-tests/replace-by-fee.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,6 @@ def test_too_many_replacements(self):
393393
utxo = make_utxo(self.nodes[0], initial_nValue)
394394
fee = int(0.0001*COIN)
395395
split_value = int((initial_nValue-fee)/(MAX_REPLACEMENT_LIMIT+1))
396-
actual_fee = initial_nValue - split_value*(MAX_REPLACEMENT_LIMIT+1)
397396

398397
outputs = []
399398
for i in range(MAX_REPLACEMENT_LIMIT+1):

qa/rpc-tests/wallet.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,6 @@ def run_test (self):
359359
rawtx = self.nodes[0].createrawtransaction([{"txid":singletxid, "vout":0}], {chain_addrs[0]:node0_balance/2-Decimal('0.01'), chain_addrs[1]:node0_balance/2-Decimal('0.01')})
360360
signedtx = self.nodes[0].signrawtransaction(rawtx)
361361
singletxid = self.nodes[0].sendrawtransaction(signedtx["hex"])
362-
txids = [singletxid, singletxid]
363362
self.nodes[0].generate(1)
364363

365364
# Make a long chain of unconfirmed payments without hitting mempool limit

0 commit comments

Comments
 (0)