diff --git a/tests/mine_with_market_test.py b/tests/mine_with_market_test.py index 11acf53..a0e8ced 100755 --- a/tests/mine_with_market_test.py +++ b/tests/mine_with_market_test.py @@ -75,7 +75,7 @@ class MineTest(TestFramework): wait_until(lambda: self.mine_contract.last_mined_epoch() == start_epoch + 1 and not self.mine_contract.can_submit(), timeout=120) rewards = self.reward_contract.reward_distributes() - assert_equal(len(rewards), 2) + assert_equal(len(rewards), 4) firstReward = rewards[0].args.amount self.log.info("Received reward %d Gwei", firstReward / (10**9)) @@ -96,8 +96,8 @@ class MineTest(TestFramework): assert_equal(self.contract.epoch(), start_epoch + 2) rewards = self.reward_contract.reward_distributes() - assert_equal(len(rewards), 4) - secondReward = rewards[2].args.amount + assert_equal(len(rewards), 8) + secondReward = rewards[4].args.amount self.log.info("Received reward %d Gwei", secondReward / (10**9)) assert_greater_than(secondReward, 100 * firstReward / (start_epoch + 1)) diff --git a/tests/test_framework/contract_proxy.py b/tests/test_framework/contract_proxy.py index 5f11dd8..7f2d156 100644 --- a/tests/test_framework/contract_proxy.py +++ b/tests/test_framework/contract_proxy.py @@ -104,6 +104,9 @@ class MineContractProxy(ContractProxy): def can_submit(self, node_idx=0): return self._call("canSubmit", node_idx) + + def current_submissions(self, node_idx=0): + return self._call("currentSubmissions", node_idx) def set_quality(self, quality, node_idx=0): return self._send("setQuality", node_idx, _targetQuality=quality)