aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorbrunoerg <brunoely.gc@gmail.com>2023-07-26 16:05:37 -0300
committerbrunoerg <brunoely.gc@gmail.com>2023-07-26 16:05:37 -0300
commit108c6255bc670bbf2732f2b79f6c32c26e181208 (patch)
treec8d0d40ac66735581d8993bc2626524d91d5b73f /test
parent0fc3deee9a34d2f8e8014da776e6cefc2bd6f664 (diff)
downloadbitcoin-108c6255bc670bbf2732f2b79f6c32c26e181208.tar.xz
test: remove unused `totalOut` code
In `wallet_fundrawtransaction`, `totalOut` is used in some functions to check if the change is correct. In other ones, it has been created but never used.
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/wallet_fundrawtransaction.py9
1 files changed, 0 insertions, 9 deletions
diff --git a/test/functional/wallet_fundrawtransaction.py b/test/functional/wallet_fundrawtransaction.py
index ec5f0ef5f0..4778a8e567 100755
--- a/test/functional/wallet_fundrawtransaction.py
+++ b/test/functional/wallet_fundrawtransaction.py
@@ -206,9 +206,6 @@ class RawTransactionsTest(BitcoinTestFramework):
rawtxfund = self.nodes[2].fundrawtransaction(rawtx)
dec_tx = self.nodes[2].decoderawtransaction(rawtxfund['hex'])
- totalOut = 0
- for out in dec_tx['vout']:
- totalOut += out['value']
assert len(dec_tx['vin']) > 0
assert_equal(dec_tx['vin'][0]['scriptSig']['hex'], '')
@@ -331,10 +328,8 @@ class RawTransactionsTest(BitcoinTestFramework):
rawtxfund = self.nodes[2].fundrawtransaction(rawtx)
dec_tx = self.nodes[2].decoderawtransaction(rawtxfund['hex'])
- totalOut = 0
matchingOuts = 0
for i, out in enumerate(dec_tx['vout']):
- totalOut += out['value']
if out['scriptPubKey']['address'] in outputs:
matchingOuts+=1
else:
@@ -361,10 +356,8 @@ class RawTransactionsTest(BitcoinTestFramework):
assert_raises_rpc_error(-4, ERR_NOT_ENOUGH_PRESET_INPUTS, self.nodes[2].fundrawtransaction, rawtx, add_inputs=False)
rawtxfund = self.nodes[2].fundrawtransaction(rawtx, add_inputs=True)
dec_tx = self.nodes[2].decoderawtransaction(rawtxfund['hex'])
- totalOut = 0
matchingOuts = 0
for out in dec_tx['vout']:
- totalOut += out['value']
if out['scriptPubKey']['address'] in outputs:
matchingOuts+=1
@@ -395,10 +388,8 @@ class RawTransactionsTest(BitcoinTestFramework):
rawtxfund = self.nodes[2].fundrawtransaction(rawtx, add_inputs=True)
dec_tx = self.nodes[2].decoderawtransaction(rawtxfund['hex'])
- totalOut = 0
matchingOuts = 0
for out in dec_tx['vout']:
- totalOut += out['value']
if out['scriptPubKey']['address'] in outputs:
matchingOuts+=1