diff --git a/src/gridcoin/researcher.cpp b/src/gridcoin/researcher.cpp index d895fc2f46..4f131115c6 100644 --- a/src/gridcoin/researcher.cpp +++ b/src/gridcoin/researcher.cpp @@ -659,12 +659,12 @@ AdvertiseBeaconResult GenerateBeaconKey(const Cpid& cpid) return BeaconError::MISSING_KEY; } - // Since the network-wide rain feature outputs GRC to beacon public key - // addresses, we describe this key as the participant's rain address to - // help identify transactions in the GUI: - // + // We label this key in the GUI to indicate to the user that it is a beacon key. + // The block number is also included because there are situations where there + // could be multiple beacon keys in the wallet due to expiration or forced re- + // advertisement. const std::string address_label = strprintf( - "Beacon Rain Address for CPID %s (at %" PRIu64 ")", + "Beacon Address for CPID %s (at %" PRIu64 ")", cpid.ToString(), static_cast(nBestHeight)); diff --git a/src/qt/forms/rpcconsole.ui b/src/qt/forms/rpcconsole.ui index 53d024f6c3..b61666dbdb 100755 --- a/src/qt/forms/rpcconsole.ui +++ b/src/qt/forms/rpcconsole.ui @@ -7,7 +7,7 @@ 0 0 1000 - 720 + 944 @@ -48,7 +48,7 @@ - + N/A @@ -295,9 +295,9 @@ - + - Proof Of Research Difficulty + Difficulty diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index a2059d6a50..b79672a1f0 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -411,7 +411,7 @@ void RPCConsole::setClientModel(ClientModel *model) setNumBlocks(model->getNumBlocks(), model->getNumBlocksOfPeers()); ui->boostVersion->setText(model->formatBoostVersion()); - ui->porDiff->setText(model->getDifficulty()); + ui->diff->setText(model->getDifficulty()); //Setup autocomplete and attach it QStringList wordList; @@ -487,7 +487,7 @@ void RPCConsole::message(int category, const QString &message, bool html) void RPCConsole::setNumConnections(int count) { ui->numberOfConnections->setText(QString::number(count)); - if (clientModel) ui->porDiff->setText(clientModel->getDifficulty()); + if (clientModel) ui->diff->setText(clientModel->getDifficulty()); } @@ -500,7 +500,7 @@ void RPCConsole::setNumBlocks(int count, int countOfPeers) // If there is no current number available display N/A instead of 0, which can't ever be true ui->totalBlocks->setText(clientModel->getNumBlocksOfPeers() == 0 ? tr("N/A") : QString::number(clientModel->getNumBlocksOfPeers())); ui->lastBlockTime->setText(clientModel->getLastBlockDate().toString()); - ui->porDiff->setText(clientModel->getDifficulty()); + ui->diff->setText(clientModel->getDifficulty()); } } diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp index c5bafe901b..c1f7a191ce 100644 --- a/src/qt/transactiondesc.cpp +++ b/src/qt/transactiondesc.cpp @@ -119,31 +119,31 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, unsigned int vo switch (gentype) { case MinedType::POS: - strHTML += tr("MINED - POS"); + strHTML += tr("Mined - PoS"); break; case MinedType::POR: - strHTML += tr("MINED - POR"); + strHTML += tr("Mined - PoS+RR"); break; case MinedType::ORPHANED: - strHTML += tr("MINED - ORPHANED"); + strHTML += tr("Mined - Orphaned"); break; case MinedType::POS_SIDE_STAKE_RCV: - strHTML += tr("POS SIDE STAKE RECEIVED"); + strHTML += tr("PoS Side Stake Received"); break; case MinedType::POR_SIDE_STAKE_RCV: - strHTML += tr("POR SIDE STAKE RECEIVED"); + strHTML += tr("PoS+RR Side Stake Received"); break; case MinedType::POS_SIDE_STAKE_SEND: - strHTML += tr("POS SIDE STAKE SENT"); + strHTML += tr("PoS Side Stake Sent"); break; case MinedType::POR_SIDE_STAKE_SEND: - strHTML += tr("POR SIDE STAKE SENT"); + strHTML += tr("PoS+RR Side Stake Sent"); break; case MinedType::SUPERBLOCK: - strHTML += tr("SUPERBLOCK"); + strHTML += tr("Mined - Superblock"); break; default: - strHTML += tr("MINED - UNKNOWN"); + strHTML += tr("Mined - Unknown"); break; } diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp index e5514651e7..b66956048c 100644 --- a/src/qt/transactiontablemodel.cpp +++ b/src/qt/transactiontablemodel.cpp @@ -404,23 +404,23 @@ QString TransactionTableModel::formatTxType(const TransactionRecord *wtx) const switch (wtx->status.generated_type) { case MinedType::POS: - return tr("MINED - POS"); + return tr("Mined - PoS"); case MinedType::POR: - return tr("MINED - POR"); + return tr("Mined - PoS+RR"); case MinedType::ORPHANED: - return tr("MINED - ORPHANED"); + return tr("Mined - Orphaned"); case MinedType::POS_SIDE_STAKE_RCV: - return tr("POS SIDE STAKE RECEIVED"); + return tr("PoS Side Stake Received"); case MinedType::POR_SIDE_STAKE_RCV: - return tr("POR SIDE STAKE RECEIVED"); + return tr("PoS+RR Side Stake Received"); case MinedType::POS_SIDE_STAKE_SEND: - return tr("POS SIDE STAKE SENT"); + return tr("PoS Side Stake Sent"); case MinedType::POR_SIDE_STAKE_SEND: - return tr("POR SIDE STAKE SENT"); + return tr("PoS+RR Side Stake Sent"); case MinedType::SUPERBLOCK: - return tr("MINED - SUPERBLOCK"); + return tr("Mined - Superblock"); default: - return tr("MINED - UNKNOWN"); + return tr("Mined - Unknown"); } } case TransactionRecord::BeaconAdvertisement: diff --git a/src/qt/votingdialog.cpp b/src/qt/votingdialog.cpp index 52c1504e95..483d47cd4a 100644 --- a/src/qt/votingdialog.cpp +++ b/src/qt/votingdialog.cpp @@ -51,7 +51,7 @@ static int column_alignments[] = { Qt::AlignRight|Qt::AlignVCenter, // RowNumber Qt::AlignLeft|Qt::AlignVCenter, // Expiration Qt::AlignLeft|Qt::AlignVCenter, // Title - Qt::AlignLeft|Qt::AlignVCenter, // BestAnswer + Qt::AlignLeft|Qt::AlignVCenter, // TopAnswer Qt::AlignRight|Qt::AlignVCenter, // TotalParticipants Qt::AlignRight|Qt::AlignVCenter, // TotalShares Qt::AlignLeft|Qt::AlignVCenter, // ShareType @@ -65,7 +65,7 @@ VotingTableModel::VotingTableModel(void) << tr("#") << tr("Expiration") << tr("Title") - << tr("Best Answer") + << tr("Top Answer") << tr("# Voters") // Total Participants << tr("Total Shares") << tr("Share Type") @@ -115,8 +115,8 @@ QVariant VotingTableModel::data(const QModelIndex &index, int role) const return item->totalParticipants_; case TotalShares: return item->totalShares_; - case BestAnswer: - return item->bestAnswer_; + case TopAnswer: + return item->topAnswer_; default: ; } @@ -137,8 +137,8 @@ QVariant VotingTableModel::data(const QModelIndex &index, int role) const return item->totalParticipants_; case TotalShares: return item->totalShares_; - case BestAnswer: - return item->bestAnswer_; + case TopAnswer: + return item->topAnswer_; default: ; } @@ -162,8 +162,8 @@ QVariant VotingTableModel::data(const QModelIndex &index, int role) const case TotalSharesRole: return item->totalShares_; - case BestAnswerRole: - return item->bestAnswer_; + case TopAnswerRole: + return item->topAnswer_; case Qt::TextAlignmentRole: return column_alignments[index.column()]; @@ -202,8 +202,8 @@ QVariant VotingTableModel::headerData(int section, Qt::Orientation orientation, return tr("Total Participants."); case TotalShares: return tr("Total Shares."); - case BestAnswer: - return tr("Best Answer."); + case TopAnswer: + return tr("Top Answer."); } } } @@ -269,7 +269,7 @@ VotingItem* BuildPollItem(const PollRegistry::Sequence::Iterator& iter) } if (!result->m_votes.empty()) { - item->bestAnswer_ = QString::fromStdString(result->WinnerLabel()).replace("_"," "); + item->topAnswer_ = QString::fromStdString(result->WinnerLabel()).replace("_"," "); } return item; @@ -424,7 +424,13 @@ VotingDialog::VotingDialog(QWidget *parent) tableView_->setModel(proxyModel_); tableView_->setFont(QFont("Arial", 10)); tableView_->horizontalHeader()->setSectionResizeMode(QHeaderView::Interactive); - tableView_->horizontalHeader()->setMinimumWidth(VOTINGDIALOG_WIDTH_RowNumber + VOTINGDIALOG_WIDTH_Title + VOTINGDIALOG_WIDTH_Expiration + VOTINGDIALOG_WIDTH_ShareType + VOTINGDIALOG_WIDTH_TotalParticipants + VOTINGDIALOG_WIDTH_TotalShares + VOTINGDIALOG_WIDTH_BestAnswer); + tableView_->horizontalHeader()->setMinimumWidth(VOTINGDIALOG_WIDTH_RowNumber + + VOTINGDIALOG_WIDTH_Title + + VOTINGDIALOG_WIDTH_Expiration + + VOTINGDIALOG_WIDTH_ShareType + + VOTINGDIALOG_WIDTH_TotalParticipants + + VOTINGDIALOG_WIDTH_TotalShares + + VOTINGDIALOG_WIDTH_TopAnswer); tableView_->verticalHeader()->setDefaultSectionSize(40); groupboxvlayout->addWidget(tableView_); @@ -443,7 +449,8 @@ VotingDialog::VotingDialog(QWidget *parent) voteDialog_ = new VotingVoteDialog(this); pollDialog_ = new NewPollDialog(this); - loadingIndicator->setText(tr("Press reload to load polls... This can take several minutes, and the wallet may not respond until finished.")); + loadingIndicator->setText(tr("Press reload to load polls... This can take several minutes, and the wallet may not " + "respond until finished.")); tableView_->hide(); loadingIndicator->show(); @@ -468,7 +475,8 @@ void VotingDialog::loadPolls(bool history) bool isRunning = watcher.property("running").toBool(); if (tableModel_&& !isRunning) { - loadingIndicator->setText(tr("Recalculating voting weights... This can take several minutes, and the wallet may not respond until finished.")); + loadingIndicator->setText(tr("Recalculating voting weights... This can take several minutes, and the wallet may not " + "respond until finished.")); tableView_->hide(); loadingIndicator->show(); @@ -537,11 +545,15 @@ void VotingDialog::tableColResize(void) tableView_->setColumnWidth(VotingTableModel::TotalParticipants, VOTINGDIALOG_WIDTH_TotalParticipants); tableView_->setColumnWidth(VotingTableModel::TotalShares, VOTINGDIALOG_WIDTH_TotalShares); - int fixedColWidth = VOTINGDIALOG_WIDTH_RowNumber + VOTINGDIALOG_WIDTH_Expiration + VOTINGDIALOG_WIDTH_ShareType + VOTINGDIALOG_WIDTH_TotalParticipants + VOTINGDIALOG_WIDTH_TotalShares; + int fixedColWidth = VOTINGDIALOG_WIDTH_RowNumber + + VOTINGDIALOG_WIDTH_Expiration + + VOTINGDIALOG_WIDTH_ShareType + + VOTINGDIALOG_WIDTH_TotalParticipants + + VOTINGDIALOG_WIDTH_TotalShares; int dynamicWidth = tableView_->horizontalHeader()->width() - fixedColWidth; int nColumns = 2; // 2 dynamic columns - int columns[] = {VotingTableModel::Title,VotingTableModel::BestAnswer}; + int columns[] = {VotingTableModel::Title,VotingTableModel::TopAnswer}; int remainingWidth = dynamicWidth % nColumns; for(int cNum = 0; cNum < nColumns; cNum++) { if(remainingWidth > 0) @@ -728,10 +740,10 @@ VotingChartDialog::VotingChartDialog(QWidget *parent) url_->setOpenExternalLinks(true); glayout->addWidget(url_, 1, 1); - QLabel *bestAnswer = new QLabel(tr("Best Answer: ")); - bestAnswer->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); - bestAnswer->setTextInteractionFlags(Qt::TextSelectableByMouse); - glayout->addWidget(bestAnswer, 3, 0); + QLabel *topAnswer = new QLabel(tr("Top Answer: ")); + topAnswer->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); + topAnswer->setTextInteractionFlags(Qt::TextSelectableByMouse); + glayout->addWidget(topAnswer, 3, 0); answer_ = new QLabel(); answer_->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); @@ -786,8 +798,8 @@ void VotingChartDialog::resetData(const VotingItem *item) question_->setText(item->question_); url_->setText("url_+"\">"+item->url_+""); - answer_->setText(item->bestAnswer_); - answer_->setVisible(!item->bestAnswer_.isEmpty()); + answer_->setText(item->topAnswer_); + answer_->setVisible(!item->topAnswer_.isEmpty()); answerModel_->setRowCount(item->vectorOfAnswers_.size()); for (size_t y = 0; y < item->vectorOfAnswers_.size(); y++) @@ -876,10 +888,10 @@ VotingVoteDialog::VotingVoteDialog(QWidget *parent) responseType_->setTextInteractionFlags(Qt::TextSelectableByMouse); glayout->addWidget(responseType_, 3, 1); - QLabel *bestAnswer = new QLabel(tr("Best Answer: ")); - bestAnswer->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); - bestAnswer->setTextInteractionFlags(Qt::TextSelectableByMouse); - glayout->addWidget(bestAnswer, 4, 0); + QLabel *topAnswer = new QLabel(tr("Top Answer: ")); + topAnswer->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); + topAnswer->setTextInteractionFlags(Qt::TextSelectableByMouse); + glayout->addWidget(topAnswer, 4, 0); answer_ = new QLabel(); answer_->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); @@ -924,7 +936,7 @@ void VotingVoteDialog::resetData(const VotingItem *item) question_->setText(item->question_); url_->setText("url_+"\">"+item->url_+""); responseType_->setText(item->responseType_); - answer_->setText(item->bestAnswer_); + answer_->setText(item->topAnswer_); pollTxid_ = item->pollTxid_; for (const auto& choice : item->vectorOfAnswers_) { diff --git a/src/qt/votingdialog.h b/src/qt/votingdialog.h index 0de6b64835..7299e7a1ea 100644 --- a/src/qt/votingdialog.h +++ b/src/qt/votingdialog.h @@ -48,7 +48,7 @@ class WalletModel; #define VOTINGDIALOG_WIDTH_ShareType 80 #define VOTINGDIALOG_WIDTH_TotalParticipants 80 #define VOTINGDIALOG_WIDTH_TotalShares 100 -#define VOTINGDIALOG_WIDTH_BestAnswer 80 +#define VOTINGDIALOG_WIDTH_TopAnswer 80 namespace polling { // TODO: Legacy struct moved here until we redesign the voting GUI. @@ -79,7 +79,7 @@ class VotingItem { unsigned int totalParticipants_; unsigned int totalShares_; QString url_; - QString bestAnswer_; + QString topAnswer_; }; // VotingTableModel @@ -97,7 +97,7 @@ class VotingTableModel RowNumber = 0, Expiration = 1, Title = 2, - BestAnswer = 3, + TopAnswer = 3, TotalParticipants = 4, TotalShares = 5, ShareType = 6, @@ -107,7 +107,7 @@ class VotingTableModel RowNumberRole = Qt::UserRole, ExpirationRole, TitleRole, - BestAnswerRole, + TopAnswerRole, TotalParticipantsRole, TotalSharesRole, ShareTypeRole,