Skip to content

Commit 168b7f6

Browse files
authored
feat(core, client): include commitTime into Status (#258)
1 parent 668f72a commit 168b7f6

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

.github/workflows/pull-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
branches: [main]
77
env:
88
IROHA_GIT: https://github.com/hyperledger-iroha/iroha.git
9-
IROHA_REV: c1d8b5e2fbffabba13e448a66f9b5dd86875cf18 # 2.0.0-rc.2 wip
9+
IROHA_REV: v2.0.0-rc.2.0
1010
jobs:
1111
prep-crypto-wasm:
1212
runs-on: ubuntu-latest

packages/core/tests/misc.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ describe('Status', () => {
113113
peers: 4n,
114114
blocks: 5n,
115115
blocksNonEmpty: 3n,
116+
commitTime: dm.DurationCompact.fromMillis(130),
116117
txsApproved: 31n,
117118
txsRejected: 3n,
118119
uptime: {
@@ -122,17 +123,18 @@ describe('Status', () => {
122123
viewChanges: 2n,
123124
queueSize: 18n,
124125
}
125-
const ENCODED = '10140C7C0C14407CD9370848'
126+
const ENCODED = '10140C09027C0C14407CD9370848'
126127

127128
expect(encodeHex(getCodec(dm.Status).encode(STATUS)).toUpperCase()).toEqual(ENCODED)
128129
expect(getCodec(dm.Status).decode(decodeHex(ENCODED))).toEqual(STATUS)
129130
})
130131

131132
test('From zeros', () => {
132-
expect(getCodec(dm.Status).decode(fromHexWithSpaces('00 00 00 00 00 00 00 00 00 00 00 00'))).toEqual(
133+
expect(getCodec(dm.Status).decode(fromHexWithSpaces('00 00 00 00 00 00 00 00 00 00 00 00 00'))).toEqual(
133134
{
134135
blocks: 0n,
135136
blocksNonEmpty: 0n,
137+
commitTime: dm.DurationCompact.fromMillis(0),
136138
peers: 0n,
137139
queueSize: 0n,
138140
txsApproved: 0n,

tests/node/tests/client-apis.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ describe('Telemetry API methods', () => {
9090
{
9191
"blocks": 2n,
9292
"blocksNonEmpty": 1n,
93+
"commitTime": {
94+
"ms": 0n,
95+
},
9396
"peers": 0n,
9497
"queueSize": 0n,
9598
"txsApproved": 3n,

0 commit comments

Comments
 (0)