|
1 | 1 | #!/usr/bin/env python3 |
2 | | -# Copyright (c) 2020 The DIVI developers |
| 2 | +# Copyright (c) 2020-2021 The DIVI developers |
3 | 3 | # Distributed under the MIT/X11 software license, see the accompanying |
4 | 4 | # file COPYING or http://www.opensource.org/licenses/mit-license.php. |
5 | 5 |
|
@@ -78,7 +78,7 @@ def start_node (self, n): |
78 | 78 | args.append ("-masternodeprivkey=%s" % self.cfg.privkey) |
79 | 79 |
|
80 | 80 | if self.cfg: |
81 | | - cfg = [self.cfg.line] |
| 81 | + cfg = [self.cfg.getLine ()] |
82 | 82 | else: |
83 | 83 | cfg = [] |
84 | 84 |
|
@@ -153,8 +153,7 @@ def fund_vault (self): |
153 | 153 |
|
154 | 154 | self.cfg = fund_masternode (self.nodes[0], "mn", "copper", txid, |
155 | 155 | "localhost:%d" % p2p_port (1)) |
156 | | - # FIXME: Use reward address from node 0. |
157 | | - self.cfg.rewardAddr = addr |
| 156 | + self.cfg.rewardAddr = self.nodes[0].getnewaddress ("reward") |
158 | 157 |
|
159 | 158 | for i in [0, 2]: |
160 | 159 | self.stop_node (i) |
@@ -242,7 +241,9 @@ def get_payments (self): |
242 | 241 | break |
243 | 242 | assert_equal (found, True) |
244 | 243 |
|
245 | | - # FIXME: Check in wallet when we have a custom reward address. |
| 244 | + # The payments should have been received at the reward address |
| 245 | + # and in particular not be lost in the "destroyed" vault. |
| 246 | + assert_greater_than (self.nodes[0].getbalance ("reward"), 0) |
246 | 247 |
|
247 | 248 | def unvault (self): |
248 | 249 | print ("Unvaulting the funds...") |
|
0 commit comments