From 438350b58f2651f2a014f647dc9f36c9ce1e5c62 Mon Sep 17 00:00:00 2001 From: Bushstar Date: Mon, 16 May 2022 11:51:39 +0100 Subject: [PATCH] community balances in account change --- src/validation.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/validation.cpp b/src/validation.cpp index 978997671a2..fe485db9259 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -2049,10 +2049,12 @@ Res ApplyGeneralCoinbaseTx(CCustomCSView & mnview, CTransaction const & tx, int if ((height < consensus.FortCanningHeight && kv.first == CommunityAccountType::Loan) || kv.first == CommunityAccountType::Options) { + LogPrint(BCLog::ACCOUNTCHANGE, "AccountChange: txid=%s community=%s change=%s\n", tx.GetHash().ToString(), GetCommunityAccountName(CommunityAccountType::Unallocated), (CBalances{{{{0}, subsidy}}}.ToString())); res = mnview.AddCommunityBalance(CommunityAccountType::Unallocated, subsidy); } else { + LogPrint(BCLog::ACCOUNTCHANGE, "AccountChange: txid=%s community=%s change=%s\n", tx.GetHash().ToString(), GetCommunityAccountName(kv.first), (CBalances{{{{0}, subsidy}}}.ToString())); res = mnview.AddCommunityBalance(kv.first, subsidy); } @@ -2068,6 +2070,7 @@ Res ApplyGeneralCoinbaseTx(CCustomCSView & mnview, CTransaction const & tx, int { for (const auto& kv : consensus.nonUtxoBlockSubsidies) { CAmount subsidy = blockReward * kv.second / COIN; + LogPrint(BCLog::ACCOUNTCHANGE, "AccountChange: txid=%s community=%s change=%s\n", tx.GetHash().ToString(), GetCommunityAccountName(kv.first), (CBalances{{{{0}, subsidy}}}.ToString())); Res res = mnview.AddCommunityBalance(kv.first, subsidy); if (!res.ok) { return Res::ErrDbg("bad-cb-community-rewards", "can't take non-UTXO community share from coinbase");