Remove an excess condition from RewardByBlock

This commit is contained in:
Vadim 2020-03-27 12:05:12 +03:00
parent ea84f6127c
commit da74008706
3 changed files with 0 additions and 34 deletions

View File

@ -73,8 +73,6 @@ contract RewardByBlock is EternalStorage, IRewardByBlock {
return (new address[](0), new uint256[](0));
}
require(_isMiningActive(miningKey));
uint256 extraLength = extraReceiversLength();
address[] memory receivers = new address[](extraLength.add(2));

View File

@ -127,22 +127,6 @@ contract('RewardByBlock [all features]', function (accounts) {
).should.be.rejectedWith(ERROR_MSG);
});
it('should revert if mining key does not exist', async () => {
const {logs} = await keysManager.removeMiningKey(miningKey3, {from: votingToChangeKeys});
logs[0].event.should.equal("MiningKeyChanged");
await rewardByBlock.setSystemAddress(systemAddress);
await rewardByBlock.reward(
[miningKey3],
[0],
{from: systemAddress}
).should.be.rejectedWith(ERROR_MSG);
await rewardByBlock.reward(
[miningKey2],
[0],
{from: systemAddress}
).should.be.fulfilled;
});
it('should assign rewards to payout key and EmissionFunds', async () => {
(await rewardByBlock.mintedForAccount.call(payoutKey)).should.be.bignumber.equal(0);
(await rewardByBlock.mintedForAccount.call(emissionFundsAddress)).should.be.bignumber.equal(0);

View File

@ -132,22 +132,6 @@ contract('RewardByBlock upgraded [all features]', function (accounts) {
).should.be.rejectedWith(ERROR_MSG);
});
it('should revert if mining key does not exist', async () => {
const {logs} = await keysManager.removeMiningKey(miningKey3, {from: votingToChangeKeys});
logs[0].event.should.equal("MiningKeyChanged");
await rewardByBlock.setSystemAddress(systemAddress);
await rewardByBlock.reward(
[miningKey3],
[0],
{from: systemAddress}
).should.be.rejectedWith(ERROR_MSG);
await rewardByBlock.reward(
[miningKey2],
[0],
{from: systemAddress}
).should.be.fulfilled;
});
it('should assign rewards to payout key and EmissionFunds', async () => {
(await rewardByBlock.mintedForAccount.call(payoutKey)).should.be.bignumber.equal(0);
(await rewardByBlock.mintedForAccount.call(emissionFundsAddress)).should.be.bignumber.equal(0);