Skip to content

Commit

Permalink
RPC test for immature balance
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasschnelli authored and gmaxwell committed Dec 26, 2014
1 parent 8024d67 commit 12d927a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions qa/rpc-tests/wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ def run_test (self):

self.nodes[0].setgenerate(True, 1)

walletinfo = self.nodes[0].getwalletinfo()
assert_equal(walletinfo['immature_balance'], 50)
assert_equal(walletinfo['balance'], 0)

self.sync_all()
self.nodes[1].setgenerate(True, 101)
self.sync_all()
Expand All @@ -54,6 +58,9 @@ def run_test (self):
self.nodes[0].sendtoaddress(self.nodes[2].getnewaddress(), 11)
self.nodes[0].sendtoaddress(self.nodes[2].getnewaddress(), 10)

walletinfo = self.nodes[0].getwalletinfo()
assert_equal(walletinfo['immature_balance'], 0)

# Have node0 mine a block, thus he will collect his own fee.
self.nodes[0].setgenerate(True, 1)
self.sync_all()
Expand Down

0 comments on commit 12d927a

Please sign in to comment.