qa: Use wallet to retrieve raw transactions
This commit is contained in:
2 files changed
+11
-11
No files matched your search
@@ -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 = []
|
||||
|
||||
Reference in new issue
Block a user