diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-05-17 18:51:28 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-05-17 18:51:39 +0200 |
commit | ea1fd43bb9a35f3ae7262f6193d0d0f478efef3b (patch) | |
tree | a05e4a083d8e519661dcf2a9a9cdeb9f81f1b35a /test | |
parent | 526e8390e6be32b33a7fe2c6388d1ade8bdbb5aa (diff) | |
parent | d4668f35ab230083e39ab05857ccae4fe77dcb50 (diff) |
Merge #10257: [test] Add test for getmemoryinfo
d4668f3 [test] Add test for getmemoryinfo (Jimmy Song)
Tree-SHA512: f5285022504f7f3a5d85981c7c424e5cf1156167dbc4209933ea2a699b741e427f4f908f6d49435376c0e23347db24eb1129b74805cbfce5e0b4ce9e48f71fb0
Diffstat (limited to 'test')
-rwxr-xr-x | test/functional/wallet.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/functional/wallet.py b/test/functional/wallet.py index 57f6dfdaa9..efde2e005e 100755 --- a/test/functional/wallet.py +++ b/test/functional/wallet.py @@ -57,8 +57,13 @@ class WalletTest(BitcoinTestFramework): assert_equal(len(self.nodes[2].listunspent()), 0) # Send 21 BTC from 0 to 2 using sendtoaddress call. + # Locked memory should use at least 32 bytes to sign each transaction + self.log.info("test getmemoryinfo") + memory_before = self.nodes[0].getmemoryinfo() self.nodes[0].sendtoaddress(self.nodes[2].getnewaddress(), 11) mempool_txid = self.nodes[0].sendtoaddress(self.nodes[2].getnewaddress(), 10) + memory_after = self.nodes[0].getmemoryinfo() + assert(memory_before['locked']['used'] + 64 <= memory_after['locked']['used']) self.log.info("test gettxout") # utxo spent in mempool should be visible if you exclude mempool @@ -78,7 +83,6 @@ class WalletTest(BitcoinTestFramework): # but 10 will go to node2 and the rest will go to node0 balance = self.nodes[0].getbalance() assert_equal(set([txout1['value'], txout2['value']]), set([10, balance])) - walletinfo = self.nodes[0].getwalletinfo() assert_equal(walletinfo['immature_balance'], 0) |