aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoão Barbosa <[email protected]>2019-03-27 17:00:11 +0000
committerJoão Barbosa <[email protected]>2019-03-31 11:37:41 +0100
commit4bf1b1cefa9723bf2cfa8b1a938757abc99bb17b (patch)
tree7885990ef5ad92dd6af282abc5a891afbcf99014
parentwallet: Update transactions with current mempool after load (diff)
downloaddiscoin-4bf1b1cefa9723bf2cfa8b1a938757abc99bb17b.tar.xz
discoin-4bf1b1cefa9723bf2cfa8b1a938757abc99bb17b.zip
qa: Check unconfirmed balance after loadwallet
-rwxr-xr-xtest/functional/wallet_balance.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/functional/wallet_balance.py b/test/functional/wallet_balance.py
index 05c97e034..3a65b684c 100755
--- a/test/functional/wallet_balance.py
+++ b/test/functional/wallet_balance.py
@@ -129,5 +129,17 @@ class WalletTest(BitcoinTestFramework):
# getbalance with minconf=2 will show the new balance.
assert_equal(self.nodes[1].getbalance(minconf=2), Decimal('0'))
+ # check mempool transactions count for wallet unconfirmed balance after
+ # dynamically loading the wallet.
+ before = self.nodes[1].getunconfirmedbalance()
+ dst = self.nodes[1].getnewaddress()
+ self.nodes[1].unloadwallet('')
+ self.nodes[0].sendtoaddress(dst, 0.1)
+ self.sync_all()
+ self.nodes[1].loadwallet('')
+ after = self.nodes[1].getunconfirmedbalance()
+ assert_equal(before + Decimal('0.1'), after)
+
+
if __name__ == '__main__':
WalletTest().main()