Skip to content

Commit 8e50ee2

Browse files
authored
Merge pull request miketout#302 from VerusCoin/dev
0.7.1-5
2 parents 1d7c275 + 3416b40 commit 8e50ee2

File tree

2 files changed

+13
-18
lines changed

2 files changed

+13
-18
lines changed

src/pbaas/pbaas.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1874,8 +1874,8 @@ void CConnectedChains::SignAndCommitImportTransactions(const CTransaction &lastI
18741874
}
18751875
else
18761876
{
1877-
fprintf(stderr,"%s: rejected by memory pool for\n", __func__);
1878-
LogPrintf("%s: rejected by memory pool for\n", __func__);
1877+
fprintf(stderr,"%s: rejected by memory pool for %s\n", __func__, state.GetRejectReason().c_str());
1878+
LogPrintf("%s: rejected by memory pool for %s\n", __func__, state.GetRejectReason().c_str());
18791879
}
18801880
}
18811881
break;

src/rpc/mining.cpp

+11-16
Original file line numberDiff line numberDiff line change
@@ -463,23 +463,18 @@ UniValue getmininginfo(const UniValue& params, bool fHelp)
463463
{
464464
bnStakeTarget.SetCompact(lwmaGetNextPOSRequired(&index, consensus));
465465

466-
if (bnStakeTarget == 0)
466+
if (bnStakeTarget != 0)
467467
{
468-
totalChainStake = 0;
469-
avgBlockFees = false;
470-
LogPrintf("%s: failed to estimate staking supply\n", __func__);
471-
break;
472-
}
473-
474-
// We need to compute 2**256 / (bnTarget+1), but we can't represent 2**256
475-
// as it's too large for a arith_uint256. However, as 2**256 is at least as large
476-
// as bnTarget+1, it is equal to ((2**256 - bnTarget - 1) / (bnTarget+1)) + 1,
477-
// or ~bnTarget / (nTarget+1) + 1.
478-
totalChainStake = totalChainStake + (~bnStakeTarget / (bnStakeTarget + 1)) + 1;
479-
blockCount++;
480-
if (index.IsVerusPOSBlock())
481-
{
482-
posCount++;
468+
// We need to compute 2**256 / (bnTarget+1), but we can't represent 2**256
469+
// as it's too large for a arith_uint256. However, as 2**256 is at least as large
470+
// as bnTarget+1, it is equal to ((2**256 - bnTarget - 1) / (bnTarget+1)) + 1,
471+
// or ~bnTarget / (nTarget+1) + 1.
472+
totalChainStake = totalChainStake + (~bnStakeTarget / (bnStakeTarget + 1)) + 1;
473+
blockCount++;
474+
if (index.IsVerusPOSBlock())
475+
{
476+
posCount++;
477+
}
483478
}
484479
}
485480
}

0 commit comments

Comments
 (0)