Skip to content

QT: add last block hash to debug ui#3672

Merged
UdjinM6 merged 3 commits into
dashpay:developfrom
stakecube:gui_lastBlockHash
Aug 30, 2020
Merged

QT: add last block hash to debug ui#3672
UdjinM6 merged 3 commits into
dashpay:developfrom
stakecube:gui_lastBlockHash

Conversation

@sc-9310
Copy link
Copy Markdown

@sc-9310 sc-9310 commented Aug 24, 2020

Trivial addition to display last block hash next to last block time

image

Trivial addition to display last block hash next to last block time
@xdustinface
Copy link
Copy Markdown

Linter is unhappy, see 4566bdc

Copy link
Copy Markdown

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pls see inline suggestions

Comment thread src/qt/clientmodel.cpp Outdated
Comment thread src/qt/forms/debugwindow.ui
... and linter happy

Switch QMetaObject to get last hash from pIndex instead of clientmodel
@UdjinM6
Copy link
Copy Markdown

UdjinM6 commented Aug 25, 2020

Linter still complains, pls apply 1532975fc3

Copy link
Copy Markdown

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

(Assigning v16 milestone and "backport" label since I think it might be useful for qt users to debug issues which often start with "what block hash are you at?" question)

@UdjinM6 UdjinM6 added this to the 16 milestone Aug 26, 2020
Copy link
Copy Markdown

@xdustinface xdustinface left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

Copy link
Copy Markdown
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK, tested. Code looks good

Copy link
Copy Markdown
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

% 1 nit

Comment thread src/qt/clientmodel.cpp
Comment on lines +160 to +161
if (chainActive.Tip())
return QString::fromStdString(chainActive.Tip()->GetBlockHash().ToString());
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (chainActive.Tip())
return QString::fromStdString(chainActive.Tip()->GetBlockHash().ToString());
if (chainActive.Tip()) return QString::fromStdString(chainActive.Tip()->GetBlockHash().ToString());

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO it's ok-ish since it's kind of a copy-paste like thing of the function above.

@UdjinM6 UdjinM6 merged commit c8ef16a into dashpay:develop Aug 30, 2020
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Sep 8, 2020
* [QT] Add last block hash to debug ui

Trivial addition to display last block hash next to last block time

* [QT] Make last block hash selectable

... and linter happy

Switch QMetaObject to get last hash from pIndex instead of clientmodel

* [Trivial] Fix trailing whitespaces
@stakecube stakecube deleted the gui_lastBlockHash branch October 11, 2020 12:38
ftrader pushed a commit to bitcoin-cash-node/bitcoin-cash-node that referenced this pull request Apr 14, 2021
…t block hash next to last block time

Backport of Dash Core [PR#3672](dashpay/dash#3672) and [PR#3685](dashpay/dash#3685)

Fixes Bitcoin-ABC#224

Test plan: `ninja check`; and try the UI (open Debug Window)
gades pushed a commit to cosanta/cosanta-core that referenced this pull request Jan 30, 2022
* [QT] Add last block hash to debug ui

Trivial addition to display last block hash next to last block time

* [QT] Make last block hash selectable

... and linter happy

Switch QMetaObject to get last hash from pIndex instead of clientmodel

* [Trivial] Fix trailing whitespaces
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants