aboutsummaryrefslogtreecommitdiff
path: root/test/functional/wallet_abandonconflict.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2019-01-24 18:52:29 -0500
committerMarcoFalke <falke.marco@gmail.com>2019-01-26 22:43:56 -0500
commitfa5278a4196cf0b560f5eeb1fb5f9c5e98219ec4 (patch)
treed725a4ceeff34a77ec986319dd9dab2cd47b8dce /test/functional/wallet_abandonconflict.py
parentfa2198328e4650e11e0245c0fd09346815441e58 (diff)
downloadbitcoin-fa5278a4196cf0b560f5eeb1fb5f9c5e98219ec4.tar.xz
qa: Use wallet to retrieve raw transactions
Diffstat (limited to 'test/functional/wallet_abandonconflict.py')
-rwxr-xr-xtest/functional/wallet_abandonconflict.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/functional/wallet_abandonconflict.py b/test/functional/wallet_abandonconflict.py
index 198022607f..b0b151d2d6 100755
--- a/test/functional/wallet_abandonconflict.py
+++ b/test/functional/wallet_abandonconflict.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
-# Copyright (c) 2014-2018 The Bitcoin Core developers
+# Copyright (c) 2014-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the abandontransaction RPC.
@@ -55,9 +55,9 @@ class AbandonConflictTest(BitcoinTestFramework):
disconnect_nodes(self.nodes[0], 1)
# Identify the 10btc outputs
- nA = next(i for i, vout in enumerate(self.nodes[0].getrawtransaction(txA, 1)["vout"]) if vout["value"] == Decimal("10"))
- nB = next(i for i, vout in enumerate(self.nodes[0].getrawtransaction(txB, 1)["vout"]) if vout["value"] == Decimal("10"))
- nC = next(i for i, vout in enumerate(self.nodes[0].getrawtransaction(txC, 1)["vout"]) if vout["value"] == Decimal("10"))
+ nA = next(tx_out["vout"] for tx_out in self.nodes[0].gettransaction(txA)["details"] if tx_out["amount"] == Decimal("10"))
+ nB = next(tx_out["vout"] for tx_out in self.nodes[0].gettransaction(txB)["details"] if tx_out["amount"] == Decimal("10"))
+ nC = next(tx_out["vout"] for tx_out in self.nodes[0].gettransaction(txC)["details"] if tx_out["amount"] == Decimal("10"))
inputs = []
# spend 10btc outputs from txA and txB
@@ -71,7 +71,7 @@ class AbandonConflictTest(BitcoinTestFramework):
txAB1 = self.nodes[0].sendrawtransaction(signed["hex"])
# Identify the 14.99998btc output
- nAB = next(i for i, vout in enumerate(self.nodes[0].getrawtransaction(txAB1, 1)["vout"]) if vout["value"] == Decimal("14.99998"))
+ nAB = next(tx_out["vout"] for tx_out in self.nodes[0].gettransaction(txAB1)["details"] if tx_out["amount"] == Decimal("14.99998"))
#Create a child tx spending AB1 and C
inputs = []