aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/importprunedfunds.py
diff options
context:
space:
mode:
authorinstagibbs <gsanders87@gmail.com>2016-03-07 08:51:06 -0500
committerinstagibbs <gsanders87@gmail.com>2016-03-23 10:40:38 -0400
commitf1bb13c93da5d4bedf9dd2cd7357008376e9a2b4 (patch)
tree402e4fd30562dc5c4a6e438961b0387ec87c8e3a /qa/rpc-tests/importprunedfunds.py
parent7eb702954ed0e297c5ded548e6c4f11f55313b7a (diff)
Added companion removeprunedfunds call.
Diffstat (limited to 'qa/rpc-tests/importprunedfunds.py')
-rwxr-xr-xqa/rpc-tests/importprunedfunds.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/qa/rpc-tests/importprunedfunds.py b/qa/rpc-tests/importprunedfunds.py
index bac144cd75..5cbdcde9aa 100755
--- a/qa/rpc-tests/importprunedfunds.py
+++ b/qa/rpc-tests/importprunedfunds.py
@@ -115,5 +115,26 @@ class ImportPrunedFundsTest(BitcoinTestFramework):
assert_equal(address_info['iswatchonly'], False)
assert_equal(address_info['ismine'], True)
+ #Remove transactions
+
+ try:
+ self.nodes[1].removeprunedfunds(txnid1)
+ except JSONRPCException,e:
+ errorString = e.error['message']
+
+ assert('does not exist' in errorString)
+
+ balance1 = Decimal(self.nodes[1].getbalance("", 0, True))
+ assert_equal(balance1, Decimal('0.075'))
+
+
+ self.nodes[1].removeprunedfunds(txnid2)
+ balance2 = Decimal(self.nodes[1].getbalance("", 0, True))
+ assert_equal(balance2, Decimal('0.025'))
+
+ self.nodes[1].removeprunedfunds(txnid3)
+ balance3 = Decimal(self.nodes[1].getbalance("", 0, True))
+ assert_equal(balance3, Decimal('0.0'))
+
if __name__ == '__main__':
ImportPrunedFundsTest ().main ()