| 76 | } |
| 77 | |
| 78 | bool CBaseTx::IsValidHeight(int32_t nCurrHeight, int32_t nTxCacheHeight) const { |
| 79 | if (BLOCK_REWARD_TX == nTxType || UCOIN_BLOCK_REWARD_TX == nTxType || PRICE_MEDIAN_TX == nTxType) |
| 80 | return true; |
| 81 | |
| 82 | auto halfRange = nTxCacheHeight / 2; |
| 83 | return (valid_height <= nCurrHeight + halfRange) && (valid_height >= nCurrHeight - halfRange); |
| 84 | } |
| 85 | |
| 86 | uint64_t CBaseTx::GetFuelFee(CCacheWrapper &cw, int32_t height, uint32_t fuelRate) { |
| 87 | return (fuel == 0 || fuelRate == 0) ? 0 : std::ceil(fuel / 100.0f) * fuelRate; |
no outgoing calls
no test coverage detected