-
Notifications
You must be signed in to change notification settings - Fork 12
Conversation
@strophy Yeah, I would add an "image" column and print ${docker.image}:${version} there. |
OK @shumkov this has been reimplemented according to the output we specified above. We could still add some colour coding with chalk I think? Should some of these functions (like figuring out the payment queue position) be factored out into separate files to avoid repetition? |
src/commands/status/core.js
Outdated
} | ||
if (status === 'running') { | ||
if (mnsyncStatus.AssetName !== 'MASTERNODE_SYNC_FINISHED') { | ||
status = `syncing ${(blockchainInfo.verificationprogress * 100).toFixed(2)}%`; |
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.
Does verification progress include blocks syncing?
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.
No, it is just a percentage, I think this is used in the Qt GUI. We use mnsync status
to see what the current sync object is, and getblockchaininfo
returns information on headers, blocks and verification progress like this:
{
chain: 'devnet',
blocks: 129,
headers: 19296,
bestblockhash: '723fd5777109cc4ee2b267aacb78f5ef808153e298d2f5b4fff9b040763f2255',
difficulty: 4.656542373906925e-10,
mediantime: 1603983634,
verificationprogress: 0.01129172028045482,
initialblockdownload: true,
chainwork: '0000000000000000000000000000000000000000000000000000000000000104',
size_on_disk: 80417,
pruned: false,
softforks: [
{ id: 'bip34', version: 2, reject: [Object] },
{ id: 'bip66', version: 3, reject: [Object] },
{ id: 'bip65', version: 4, reject: [Object] }
],
bip9_softforks: {
...}
src/commands/status/core.js
Outdated
} | ||
if (status === 'running') { | ||
if (mnsyncStatus.AssetName !== 'MASTERNODE_SYNC_FINISHED') { | ||
status = `syncing ${(blockchainInfo.verificationprogress * 100).toFixed(2)}%`; |
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.
No, it is just a percentage, I think this is used in the Qt GUI. We use mnsync status
to see what the current sync object is, and getblockchaininfo
returns information on headers, blocks and verification progress like this:
{
chain: 'devnet',
blocks: 129,
headers: 19296,
bestblockhash: '723fd5777109cc4ee2b267aacb78f5ef808153e298d2f5b4fff9b040763f2255',
difficulty: 4.656542373906925e-10,
mediantime: 1603983634,
verificationprogress: 0.01129172028045482,
initialblockdownload: true,
chainwork: '0000000000000000000000000000000000000000000000000000000000000104',
size_on_disk: 80417,
pruned: false,
softforks: [
{ id: 'bip34', version: 2, reject: [Object] },
{ id: 'bip66', version: 3, reject: [Object] },
{ id: 'bip65', version: 4, reject: [Object] }
],
bip9_softforks: {
...}
src/commands/status/platform.js
Outdated
}, | ||
} = await tendermintNetInfoRes.json(); | ||
|
||
const explorerBlockHeightRes = await fetch('https://rpc.cloudwheels.net:26657/status'); |
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.
Let's check it if we use network evonet.
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.
I've fixed this by following the same pattern as in status:core
to check if an external block explorer exists for the current config before running the query. This condition will currently never be reached, since there is a testnet check/abort at the top of the command and the command can never run for local
config because core never reaches IsSynced
status. But this check will still be useful as platform is enabled on more networks.
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.
Looks good! 👍
Adds more output to the status command
Issue being fixed or feature implemented
Monitor dmn status, tendermint status and service versions
What was done?
How Has This Been Tested?
Breaking Changes
Checklist:
For repository code-owners and collaborators only