Skip to content

Commit

Permalink
Sync with master
Browse files Browse the repository at this point in the history
  • Loading branch information
prasannavl committed May 27, 2022
1 parent d7512f6 commit 27805c0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4378,7 +4378,6 @@ void CChainState::ProcessTokenSplits(const CBlock& block, const CBlockIndex* pin
CAccounts addAccounts;
CAccounts subAccounts;

auto scanCounter = 0;
view.ForEachBalance([&, multiplier = multiplier](CScript const& owner, const CTokenAmount& balance) {
if (oldTokenId.v == balance.nTokenId.v) {
const auto newBalance = CalculateNewAmount(multiplier, balance.nValue);
Expand All @@ -4389,13 +4388,12 @@ void CChainState::ProcessTokenSplits(const CBlock& block, const CBlockIndex* pin
subAccounts[owner].Add(balance);
totalBalance += newBalance;
}
scanCounter++;
return true;
});

LogPrintf("Token split info: rebalance " /* Continued */
"(id: %d, symbol: %s, add-accounts: %d, sub-accounts: %d, add: %d, scanned: %d)\n",
id, newToken.symbol, addAccounts.size(), subAccounts.size(), totalBalance, scanCounter);
"(id: %d, symbol: %s, add-accounts: %d, sub-accounts: %d, val: %d)\n",
id, newToken.symbol, addAccounts.size(), subAccounts.size(), totalBalance);

res = view.AddMintedTokens(newTokenId, totalBalance);
if (!res) {
Expand Down

0 comments on commit 27805c0

Please sign in to comment.