From 0f59b31304c4bd5f9cdcafbad4d826ca28d360c6 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Tue, 28 Oct 2014 13:01:58 -0700 Subject: [PATCH] cleanup GetProgress(). --- src/bitcoindjs.cc | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/bitcoindjs.cc b/src/bitcoindjs.cc index 9d639a90..64469e9f 100644 --- a/src/bitcoindjs.cc +++ b/src/bitcoindjs.cc @@ -1416,22 +1416,8 @@ NAN_METHOD(GetProgress) { Local callback = Local::Cast(args[0]); -#if 0 -NOTES: -chainActive.Height() - CBlockIndex *pindexMax = chainActive[std::max(0, chainActive.Height() - 144)]; // the tip can be reorganised; use a 144-block safety margin - if (!pindex || !chainActive.Contains(pindex)) - return chainActive.Height() - pindex->nHeight + 1; - while (pindex && nTimeFirstKey && (pindex->GetBlockTime() < (nTimeFirstKey - 7200))) - pindex = chainActive.Next(pindex); - double dProgressTip = Checkpoints::GuessVerificationProgress(chainActive.Tip(), false); -#endif - CBlockIndex *pindex = chainActive.Tip(); - // pindex->nHeight; - // pindex->GetBlockHash(); - async_block_data *data = new async_block_data(); data->err_msg = std::string(""); data->hash = pindex->GetBlockHash();