-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getrawtransaction implementation #777
base: master
Are you sure you want to change the base?
getrawtransaction implementation #777
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsNo conflicts as of last run. |
Cool, that's pretty nice! Just thinking out loud, but it does make me wonder if perhaps a new |
9485fb4
to
e233da2
Compare
@willcl-ark would love to hear more opinions on this, I also think |
Yeah I don't want to derail this pr, which I think looks good on its own! If there was desire to add more utils we could always move this later; I think this looks nice. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a lot of UX work. Definitely doesn't belong on the Help menu...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK
As @luke-jr perhaps we can create a separate menu item like "Tools" or "Utils" with this feature in it (and would be more suitable if we need to add for example other features as @willcl-ark mentioned).
Light CR.
src/qt/utilitydialog.cpp
Outdated
setWindowTitle(tr("About %1").arg(PACKAGE_NAME)); | ||
|
||
std::string licenseInfo = LicenseInfo(); | ||
/// HTML-format the license message from the core | ||
QString licenseInfoHTML = QString::fromStdString(LicenseInfo()); | ||
// Make URLs clickable | ||
QRegularExpression uri(QStringLiteral("<(.*)>"), QRegularExpression::InvertedGreedinessOption); | ||
licenseInfoHTML.replace(uri, QStringLiteral("<a href=\"\\1\">\\1</a>")); | ||
// Replace newlines with HTML breaks | ||
licenseInfoHTML.replace("\n", "<br>"); | ||
|
||
ui->aboutMessage->setTextFormat(Qt::RichText); | ||
ui->scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); | ||
text = version + "\n" + QString::fromStdString(FormatParagraph(licenseInfo)); | ||
ui->aboutMessage->setText(version + "<br><br>" + licenseInfoHTML); | ||
ui->aboutMessage->setWordWrap(true); | ||
ui->helpMessage->setVisible(false); | ||
ui->labelTxId->setVisible(false); | ||
ui->txidEdit->setVisible(false); | ||
ui->labelBlockHash->setVisible(false); | ||
ui->blockHashEdit->setVisible(false); | ||
ui->submitButton->setVisible(false); | ||
ui->verboseCheckbox->setVisible(false); | ||
break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you are here (refactoring commit 10b3cd1) I'd extract all these settings into a function like "initializeAboutModeWindow
" or something like that, same for the other modes, making the code a bit more maintainable and easier to follow.
e233da2
to
a17fb06
Compare
Add getrawtransaction RPC to GUI to tools > getrawtransactions
a17fb06
to
9659890
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK.
I have updated the PR based on the feedback given above:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK 9659890
I agree that the new place for this PR's feature looks better under the new "Tools" menu.
Also code-wise it's better to have a new separate dialog (toolsdialog
) rather than re-using the existing help dialog (HelpMessageDialog
). Thinking it loud, I wonder if we need to specify a more specific name instead of the current generic one (what other use cases would open this ToolsDialog
? Other RPC commands?). Another thoughts: how this new feature (and future ones?) integrates with the current RPC console? Should we also have some kind of link on the form to open the console with the execution of the rpc command and its output? Should we create a new sub-menu under "Tools" like "RPC commands"? These are some questions that don't need to be answered right now nor stopping this PR to go ahead and get merged, just to keep the focus on what directions we want to give to the UI and follow it up.
<item row="0" column="0"> | ||
<widget class="QLabel" name="labelTxId"> | ||
<property name="text"> | ||
<string>transaction id: </string> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
<string>transaction id: </string> | |
<string>Transaction id: </string> |
or ID
?
<item row="2" column="0"> | ||
<widget class="QLabel" name="labelBlockHash"> | ||
<property name="text"> | ||
<string>blockhash (optional): </string> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
<string>blockhash (optional): </string> | |
<string>Blockhash (optional): </string> |
@@ -368,12 +369,17 @@ void BitcoinGUI::createActions() | |||
m_mask_values_action->setStatusTip(tr("Mask the values in the Overview tab")); | |||
m_mask_values_action->setCheckable(true); | |||
|
|||
getRawTransactionAction = new QAction(tr("&Verify external txid"), this); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
getRawTransactionAction = new QAction(tr("&Verify external txid"), this); | |
getRawTransactionAction = new QAction(tr("&Verify transaction"), this); |
Some thoughts: perhaps we use a more generic naming here and in the form we indicate if it's a wallet transaction with a checkbox (and then we change the form removing the blockhash option and call gettransaction
?). Or maybe just on a follow-up.
Concept ACK |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested ACK 9659890
Concept ACK. However, I still agree with @promag's bitcoin/bitcoin#19161 (comment):
|
Seems confusing to have the same feature present twice. Once in this pop-up and another time in the RPC pop-up? If this is merged, then every RPC will be duplicated in a new GUI pop-up? |
🐙 This pull request conflicts with the target branch and needs rebase. |
⌛ There hasn't been much activity lately and the patch still needs rebase. What is the status here?
|
Fixes #645.
Add
getrawtransaction
RPC to GUI onTools -> Verify external txid.
tabScreencast.from.21-12-2023.06.35.04.ASUBUHI.webm