Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/dashmate/src/commands/group/status.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class GroupStatusCommand extends GroupBaseCommand {
} else {
plain['Platform Status'] = colors.status(scope.platform.tenderdash.serviceStatus)(scope.platform.tenderdash.serviceStatus);
plain['Platform Version'] = scope.platform.tenderdash.version;
plain['Platform Block Height'] = scope.platform.tenderdash.lastBlockHeight;
plain['Platform Block Height'] = scope.platform.tenderdash.latestBlockHeight;
plain['Platform Peers'] = scope.platform.tenderdash.peers;
plain['Platform Network'] = scope.platform.tenderdash.network;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/dashmate/src/commands/status/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class StatusCommand extends ConfigBaseCommand {

if (platform.tenderdash.serviceStatus === ServiceStatusEnum.up) {
plain['Platform Version'] = platform.tenderdash.version;
plain['Platform Block Height'] = platform.tenderdash.lastBlockHeight;
plain['Platform Block Height'] = platform.tenderdash.latestBlockHeight;
plain['Platform Peers'] = platform.tenderdash.peers;
plain['Platform Network'] = platform.tenderdash.network;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/dashmate/src/commands/status/platform.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class PlatformStatusCommand extends ConfigBaseCommand {
if (tenderdash.version) {
const {
version: tenderdashVersion,
lastBlockHeight: platformBlockHeight,
latestBlockHeight: platformBlockHeight,
latestAppHash: platformLatestAppHash,
peers: platformPeers,
network: tenderdashNetwork,
Expand Down
15 changes: 9 additions & 6 deletions packages/dashmate/src/status/scopes/platform.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ function getPlatformScopeFactory(dockerCompose,
version: null,
listening: null,
catchingUp: null,
lastBlockHash: null,
lastBlockHeight: null,
latestBlockHash: null,
latestBlockHeight: null,
latestBlockTime: null,
latestAppHash: null,
peers: null,
moniker: null,
Expand Down Expand Up @@ -109,17 +110,19 @@ function getPlatformScopeFactory(dockerCompose,
const { version, network, moniker } = tenderdashStatus.node_info;

const catchingUp = tenderdashStatus.sync_info.catching_up;
const lastBlockHeight = tenderdashStatus.sync_info.latest_block_height;
const lastBlockHash = tenderdashStatus.sync_info.latest_block_hash;
const latestBlockHeight = tenderdashStatus.sync_info.latest_block_height;
const latestBlockHash = tenderdashStatus.sync_info.latest_block_hash;
const latestAppHash = tenderdashStatus.sync_info.latest_app_hash;
const latestBlockTime = tenderdashStatus.sync_info.latest_block_time;

const platformPeers = parseInt(tenderdashNetInfo.n_peers, 10);
const { listening } = tenderdashNetInfo;

platform.tenderdash.version = version;
platform.tenderdash.listening = listening;
platform.tenderdash.lastBlockHeight = lastBlockHeight;
platform.tenderdash.lastBlockHash = lastBlockHash;
platform.tenderdash.latestBlockHeight = latestBlockHeight;
platform.tenderdash.latestBlockHash = latestBlockHash;
platform.tenderdash.latestBlockTime = latestBlockTime;
platform.tenderdash.catchingUp = catchingUp;
platform.tenderdash.peers = platformPeers;
platform.tenderdash.moniker = moniker;
Expand Down
3 changes: 2 additions & 1 deletion packages/dashmate/test/unit/status/scopes/overview.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ describe('getOverviewScopeFactory', () => {
serviceStatus: ServiceStatusEnum.up,
version: null,
catchingUp: null,
lastBlockHeight: null,
latestBlockHeight: null,
latestAppHash: null,
latestBlockTime: null,
peers: null,
network: null,
},
Expand Down
3 changes: 2 additions & 1 deletion packages/dashmate/test/unit/status/scopes/platform.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ describe('getPlatformScopeFactory', () => {
expect(scope.tenderdash.serviceStatus).to.be.equal(ServiceStatusEnum.error);
expect(scope.tenderdash.version).to.be.equal(null);
expect(scope.tenderdash.catchingUp).to.be.equal(null);
expect(scope.tenderdash.lastBlockHeight).to.be.equal(null);
expect(scope.tenderdash.latestBlockHeight).to.be.equal(null);
expect(scope.tenderdash.latestBlockTime).to.be.equal(null);
expect(scope.tenderdash.latestAppHash).to.be.equal(null);
});
});
Expand Down