From 054dcb451b00ac27580c2476ae3d518288b4b426 Mon Sep 17 00:00:00 2001 From: fekt Date: Mon, 15 Apr 2024 15:01:39 +0000 Subject: [PATCH] Fix halving calculation --- src/controller.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controller.cpp b/src/controller.cpp index acb290f..c2e7328 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -321,7 +321,7 @@ void Controller::getInfoThenRefresh(bool force) bool doUpdate = force || (model->getLatestBlock() != curBlock); int difficulty = reply["difficulty"].get(); int num_halvings = 1; // number of halvings that have occured already - int blocks_until_halving = (num_halvings*1680000 + 340000) - curBlock; + int blocks_until_halving = (num_halvings*3500000) - curBlock; int blocktime = 36; int halving_days = (blocks_until_halving * blocktime) / (60 * 60 * 24) ; int longestchain = reply["longestchain"].get();