From af2f9bbae7973a8118a34757f66075f3caed77ba Mon Sep 17 00:00:00 2001 From: metacoin Date: Wed, 19 Feb 2020 08:56:27 -0500 Subject: [PATCH] Add FLO block halving limit (34 halvings) --- lib/protocol/consensus.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/protocol/consensus.js b/lib/protocol/consensus.js index b8b8b490..bd91fab6 100644 --- a/lib/protocol/consensus.js +++ b/lib/protocol/consensus.js @@ -339,7 +339,8 @@ exports.getReward = function getReward(height, interval) { // BIP 42 (well, our own version of it, // since we can only handle 32 bit shifts). // https://github.com/bitcoin/bips/blob/master/bip-0042.mediawiki - if (halvings >= 33) + // FLO can safely handle 34 (instead of 33) halvings + if (halvings >= 34) return 0; // We need to shift right by `halvings`,