Skip to content

Commit

Permalink
Merge pull request #608 from LiskHQ/607-block-reward-exception
Browse files Browse the repository at this point in the history
Block reward exceptions - Closes #607
  • Loading branch information
Isabella Dell committed Jun 16, 2017
2 parents e98f13f + c07aa2e commit 2cdce6b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions helpers/exceptions.js
Expand Up @@ -18,6 +18,7 @@ module.exports = {
rounds: {
'27040': {rewards_factor: 2, fees_factor: 2, fees_bonus: 10000000}
},
blockRewards: [],
senderPublicKey: [
'6140297682817553271', // 12526
'17693199811026162972', // 12532
Expand Down
3 changes: 2 additions & 1 deletion modules/blocks/verify.js
Expand Up @@ -6,6 +6,7 @@ var constants = require('../../helpers/constants.js');
var crypto = require('crypto');
var slots = require('../../helpers/slots.js');
var sql = require('../../sql/blocks.js');
var exceptions = require('../../helpers/exceptions.js');

var modules, library, self, __private = {};

Expand Down Expand Up @@ -122,7 +123,7 @@ Verify.prototype.verifyBlock = function (block) {
// Calculate expected rewards
var expectedReward = __private.blockReward.calcReward(block.height);

if (block.height !== 1 && expectedReward !== block.reward) {
if (block.height !== 1 && expectedReward !== block.reward && exceptions.blockRewards.indexOf(block.id) === -1) {
result.errors.push(['Invalid block reward:', block.reward, 'expected:', expectedReward].join(' '));
}

Expand Down

0 comments on commit 2cdce6b

Please sign in to comment.