| 19 | extern CCacheDBManager *pCdMan; |
| 20 | |
| 21 | uint32_t GetFinalBlockMinerCount(const uint256& preHash = uint256()) { |
| 22 | set<CRegID> bpSet; |
| 23 | if(preHash != uint256() && pbftContext.GetMinerListByBlockHash(preHash, bpSet)) { |
| 24 | uint32_t bpsize = bpSet.size(); |
| 25 | return bpsize - bpsize/3; |
| 26 | |
| 27 | } |
| 28 | uint32_t totalBpsSize = pCdMan->pDelegateCache->GetActivedDelegateNum(); |
| 29 | return totalBpsSize - totalBpsSize/3; |
| 30 | |
| 31 | } |
| 32 | |
| 33 | CBlockIndex* CPBFTMan::GetLocalFinIndex(){ |
| 34 | LOCK(cs_finblock); |
no test coverage detected