Changeset View
Changeset View
Standalone View
Standalone View
test/functional/wallet_abandonconflict.py
Show First 20 Lines • Show All 131 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
# Unconfirmed received funds that are not in mempool also shouldn't show | # Unconfirmed received funds that are not in mempool also shouldn't show | ||||
# up in unconfirmed balance. Note that the transactions stored in the wallet | # up in unconfirmed balance. Note that the transactions stored in the wallet | ||||
# are not necessarily in the node's mempool. | # are not necessarily in the node's mempool. | ||||
unconfbalance = self.nodes[0].getunconfirmedbalance( | unconfbalance = self.nodes[0].getunconfirmedbalance( | ||||
) + self.nodes[0].getbalance() | ) + self.nodes[0].getbalance() | ||||
assert_equal(unconfbalance, newbalance) | assert_equal(unconfbalance, newbalance) | ||||
# Unconfirmed transactions which are not in the mempool should also | # Unconfirmed transactions which are not in the mempool should also | ||||
# not be in listunspent | # not be in listunspent | ||||
assert not txABC2 in [utxo["txid"] | assert txABC2 not in [utxo["txid"] | ||||
for utxo in self.nodes[0].listunspent(0)] | for utxo in self.nodes[0].listunspent(0)] | ||||
balance = newbalance | balance = newbalance | ||||
# Abandon original transaction and verify inputs are available again | # Abandon original transaction and verify inputs are available again | ||||
# including that the child tx was also abandoned | # including that the child tx was also abandoned | ||||
self.nodes[0].abandontransaction(txAB1) | self.nodes[0].abandontransaction(txAB1) | ||||
newbalance = self.nodes[0].getbalance() | newbalance = self.nodes[0].getbalance() | ||||
assert_equal(newbalance, balance + Decimal("30")) | assert_equal(newbalance, balance + Decimal("30")) | ||||
▲ Show 20 Lines • Show All 68 Lines • Show Last 20 Lines |