Added: I have added the condition in the function _mintMinerReward #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since this function is automatically called before the token transfer, it means that before every transfer, tokens are minted equal to the blockReward to reward the miner. In this scenario, after a certain number of transactions, the totalSupply will reach its maximum cap, resulting in no more rewards or minting of the token. For example, let's consider the following parameters: blockReward = 100 and Initial totalSupply = 70,000,000. After the first transfer, the totalSupply will increase to 70,000,100. After another 299,999 transfers, the totalSupply will reach 100,000,000. Therefore, there are only 300,000 successful transfers allowed. The 300,001st transfer will be reverted with an error message stating 'Maximum capped amount is reached.' To avoid this situation, it is essential to set the following condition as added to the code.