Simplified version of Block Clock#212
Conversation
- This method would allow to get the blocktime value of the block at the given height.
- This file allowing using of Chain interfaces to get information about the blockchain. - This class declares and defines the function that will be used in for the Block Clock.
1. Added a new Q_PROPERTY to track the remaining time till the IBD completioni. 2. Added two signals to later connect to the chainmodel class function. 3. Added new member variable, m_pause, which will keep track of if the block clock is in paused state or not, and will accordingly disconnect or reconnect the user to network.
- Also made appropriate connections with the nodemodel signals
- This property will later be used for the BlockClock.qml file
- The BlockClock.qml files provides the control for BlockClock and determines how the elements would be displayed. - The BlockClockComponent.qml file uses the aforementioned control to display the value, and determines what will be displayed.
|
On Ubuntu 22.04.1 LTS, I had to install Might want to extend the README for the qml directory to include that module. |
johnny9
left a comment
There was a problem hiding this comment.
Some QML errors appear during runtime. tail -f debug.log | grep GUI to watch for issues when running bitcoin-qt.
| interfaces::Chain& m_chain; | ||
| }; | ||
|
|
||
| #endif // BITCOIN_QML_CHAINMODEL_H No newline at end of file |
There was a problem hiding this comment.
"No newline at end of file"
|
|
||
| Component.onCompleted: nodeModel.startNodeInitializionThread(); | ||
|
|
||
| BlockClockComponent{} |
There was a problem hiding this comment.
GUI: qrc:/qml/pages/node/NodeRunner.qml:24:9: QML BlockClockComponent: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
Should be able to remove the ColumnLayout containing the BlockClockComponent and just define the BlockClockComponent as the content to this Page. When you do this, also remove the anchors.fill: parent and spacing: 0 in this file.
| else { | ||
| var del = 0.0025 | ||
| // Paint Block time points | ||
| for (var i=1; i<parent.blockList.length - 1; i++) { |
There was a problem hiding this comment.
The following error appears when going into the paused state.
2022-12-17T03:50:17Z GUI: qrc:/qml/controls/BlockClock.qml:96: TypeError: Value is undefined and could not be converted to an object
There was a problem hiding this comment.
Also a small style thing, put spaces before and after operators so its easier to read.
| ringProgress: blockList[0] | ||
| header: Math.floor(nodeModel.blockTipHeight / 1000) + "," + nodeModel.blockTipHeight % 1000 | ||
| subText: "Blocktime" | ||
| blockList: chainModel.timeRatioList |
There was a problem hiding this comment.
QML error appears when shutting down.
2022-12-17T03:52:37Z Shutdown: In progress...
2022-12-17T03:52:37Z torcontrol thread exit
2022-12-17T03:52:37Z addcon thread exit
2022-12-17T03:52:37Z msghand thread exit
2022-12-17T03:52:37Z net thread exit
2022-12-17T03:52:39Z opencon thread exit
2022-12-17T03:52:39Z DumpAnchors: Flush 0 outbound block-relay-only peer addresses to anchors.dat started
2022-12-17T03:52:39Z DumpAnchors: Flush 0 outbound block-relay-only peer addresses to anchors.dat completed (0.01s)
2022-12-17T03:52:39Z scheduler thread exit
2022-12-17T03:52:39Z Writing 0 unbroadcast transactions to disk.
2022-12-17T03:52:39Z Dumped mempool: 3.7e-06s to copy, 0.00448635s to dump
2022-12-17T03:52:39Z Shutdown: done
2022-12-17T03:52:39Z GUI: qrc:/qml/components/BlockClockComponent.qml:34: TypeError: Cannot read property 'timeRatioList' of null
| m_time_ratio_list.erase(m_time_ratio_list.begin() + 1, m_time_ratio_list.end()); | ||
| } | ||
| m_time_ratio_list[0] = currentTimeRatio; | ||
| } No newline at end of file |
There was a problem hiding this comment.
"No new line at end of file"





This PR is the simplified version of #148. And removes commits in #127 to allow easier upstream commit merges.
Functional changes from the original version:
connsproperty representing if the number of connections is greater than 0, has been set to always positive. With this change, the "connecting" page, though implemented, becomes inaccessible through the UI.