aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2019-04-01 15:26:58 -0400
committerMarcoFalke <falke.marco@gmail.com>2019-04-01 15:27:02 -0400
commit5a2a9b5b0603c1206e4419ffd0fd0d4939813fc2 (patch)
treece746ca42baa1130424d47ab2c9cb677277c7903 /test
parent35477e9e4e3f0f207ac6fa5764886b15bf9af8d0 (diff)
parent4bf1b1cefa9723bf2cfa8b1a938757abc99bb17b (diff)
downloadbitcoin-5a2a9b5b0603c1206e4419ffd0fd0d4939813fc2.tar.xz
Merge #15652: wallet: Update transactions with current mempool after load
4bf1b1cefa qa: Check unconfirmed balance after loadwallet (João Barbosa) 2ebf650b2e wallet: Update transactions with current mempool after load (João Barbosa) 57908a739c interfaces: Add Chain::requestMempoolTransactions (João Barbosa) 0440481c6b wallet: Move CWallet::ReacceptWalletTransactions locks to callers (João Barbosa) Pull request description: Fixes #15591. ACKs for commit 4bf1b1: MarcoFalke: re-utACK 4bf1b1cefa jnewbery: utACK 4bf1b1cefa9723bf2cfa8b1a938757abc99bb17b Tree-SHA512: 604b1057c7f9fc3772084bf6914e52dd1a68a1cfd365f907e8ec78f6f5f726bc56a3cad9f2b665642714fbf3d51e37c1184ac396460bddeafd918e8f9f7af392
Diffstat (limited to 'test')
-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 05c97e0340..3a65b684c8 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()