cleanup GetProgress().
This commit is contained in:
parent
50bcaf2918
commit
0f59b31304
|
@ -1416,22 +1416,8 @@ NAN_METHOD(GetProgress) {
|
||||||
|
|
||||||
Local<Function> callback = Local<Function>::Cast(args[0]);
|
Local<Function> callback = Local<Function>::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();
|
CBlockIndex *pindex = chainActive.Tip();
|
||||||
|
|
||||||
// pindex->nHeight;
|
|
||||||
// pindex->GetBlockHash();
|
|
||||||
|
|
||||||
async_block_data *data = new async_block_data();
|
async_block_data *data = new async_block_data();
|
||||||
data->err_msg = std::string("");
|
data->err_msg = std::string("");
|
||||||
data->hash = pindex->GetBlockHash();
|
data->hash = pindex->GetBlockHash();
|
||||||
|
|
Loading…
Reference in New Issue