diff --git a/src/gridcoin/voting/result.cpp b/src/gridcoin/voting/result.cpp index 51047e546a..8ef7fd3f1f 100644 --- a/src/gridcoin/voting/result.cpp +++ b/src/gridcoin/voting/result.cpp @@ -893,10 +893,13 @@ class VoteCounter { LOCK(cs_tx_val_commit_to_disk); + LogPrint(BCLog::LogFlags::VOTE, "INFO: %s: cs_tx_val_commit_to_disk locked", __func__); if (!m_txdb.ReadDiskTx(txid, tx)) { LogPrintf("WARN: %s: failed to read vote tx.", __func__); } + + LogPrint(BCLog::LogFlags::VOTE, "INFO: %s: cs_tx_val_commit_to_disk unlocked", __func__); } diff --git a/src/qt/voting/polltablemodel.cpp b/src/qt/voting/polltablemodel.cpp index e169ae8dbb..8f4a467c8e 100644 --- a/src/qt/voting/polltablemodel.cpp +++ b/src/qt/voting/polltablemodel.cpp @@ -6,6 +6,8 @@ #include "qt/voting/polltablemodel.h" #include "qt/voting/votingmodel.h" #include "logging.h" +#include "util.h" +#include "util/threadnames.h" #include #include @@ -260,13 +262,21 @@ void PollTableModel::refresh() __func__); return; + } else { + LogPrint(BCLog::LogFlags::VOTE, "INFO: %s: m_refresh_mutex trylock succeeded.", + __func__); } QtConcurrent::run([this]() { + RenameThread("PollTableModel_refresh"); + util::ThreadSetInternalName("PollTableModel_refresh"); + static_cast(m_data_model.get()) ->reload(m_voting_model->buildPollTable(m_filter_flags)); m_refresh_mutex.unlock(); + LogPrint(BCLog::LogFlags::VOTE, "INFO: %s: m_refresh_mutex lock released.", + __func__); }); } diff --git a/src/validation.cpp b/src/validation.cpp index e397f59962..98830e5b36 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -1648,6 +1648,7 @@ bool ConnectBlock(CBlock& block, CTxDB& txdb, CBlockIndex* pindex, bool fJustChe // to take this lock to ensure that the write to leveldb and the access of the transaction data by the signal handlers is // appropriately serialized. LOCK(cs_tx_val_commit_to_disk); + LogPrint(BCLog::LogFlags::VOTE, "INFO: %s: cs_tx_val_commit_to_disk locked", __func__); if (IsResearchAgeEnabled(pindex->nHeight) && !GridcoinConnectBlock(block, pindex, txdb, stake_value_in, nStakeReward, nFees)) @@ -1674,6 +1675,8 @@ bool ConnectBlock(CBlock& block, CTxDB& txdb, CBlockIndex* pindex, bool fJustChe if (!txdb.UpdateTxIndex(hash, index)) return error("%s: UpdateTxIndex failed", __func__); } + + LogPrint(BCLog::LogFlags::VOTE, "INFO: %s: cs_tx_val_commit_to_disk unlocked", __func__); } // Update block index on disk without changing it in memory.