Skip to content

Commit

Permalink
Use auto and reference
Browse files Browse the repository at this point in the history
  • Loading branch information
Mixa84 committed Apr 12, 2024
1 parent 1ac57e2 commit 6ed5561
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/node/miner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@ std::unique_ptr<CBlockTemplate> BlockAssembler::CreateNewBlock(const CScript& sc
feeMap[::policyAsset] = 0;
}
int index = 0;
for (auto fee : feeMap) {
CAsset fee_asset = fee.first;
CAmount fee_amount = fee.second;
for (auto& fee : feeMap) {
auto& fee_asset = fee.first;
auto& fee_amount = fee.second;
if (!g_con_any_asset_fees && fee_asset != ::policyAsset) {
continue;
}
Expand All @@ -209,7 +209,7 @@ std::unique_ptr<CBlockTemplate> BlockAssembler::CreateNewBlock(const CScript& sc
newTxOut.nAsset = fee_asset;
newTxOut.nValue = fee_amount;
if (fee_asset == chainparams.GetConsensus().subsidy_asset) {
newTxOut.nValue = fee_amount + GetBlockSubsidy(nHeight, chainparams.GetConsensus());
newTxOut.nValue = fee_amount + GetBlockSubsidy(nHeight, chainparams.GetConsensus());
}
if (g_con_elementsmode) {
if(chainparams.GetConsensus().subsidy_asset != policyAsset) {
Expand Down

0 comments on commit 6ed5561

Please sign in to comment.