diff --git a/lib/Rpc.js b/lib/Rpc.js index b1406ae22..b2842e0fe 100644 --- a/lib/Rpc.js +++ b/lib/Rpc.js @@ -121,10 +121,27 @@ Rpc.getBlock = function(hash, cb) { var tax = base * taxProportion / 10 * votersProportion; // If block height is below mainnet voting height, leave out stake - if (info.result.height < 4096) { - info.result.reward = Math.round(work + tax) / bitcore.util.COIN; - } else { - info.result.reward = Math.round(work + stake + tax) / bitcore.util.COIN; + // If block height is below mainnet voting height, leave out stake + if (info.result.version == 0) { + if (info.result.height == 0) { + info.result.reward = 0; + } else if (info.result.height == 1) { + info.result.reward = 100000; + } else if (info.result.height < 768) { + info.result.reward = Math.round(work + tax) / bitcore.util.COIN; + } else { + info.result.reward = Math.round(work + stake + tax) / bitcore.util.COIN; + } + } else if (info.result.version == 1) { + if (info.result.height == 0) { + info.result.reward = 0; + } else if (info.result.height == 1) { + info.result.reward = 1680000; + } else if (info.result.height < 4096) { + info.result.reward = Math.round(work + tax) / bitcore.util.COIN; + } else { + info.result.reward = Math.round(work + stake + tax) / bitcore.util.COIN; + } } } return cb(err,info.result);