Skip to content

Commit

Permalink
fix: tip (#27)
Browse files Browse the repository at this point in the history
Description
---
fix the tip info

Motivation and Context
---
There were changes in the base layer (renamed fields).

How Has This Been Tested?
---

What process can a PR reviewer use to test or verify this change?
---

<!-- Checklist -->
<!-- 1. Is the title of your PR in the form that would make nice release
notes? The title, excluding the conventional commit
tag, will be included exactly as is in the CHANGELOG, so please think
about it carefully. -->


Breaking Changes
---

- [x] None
- [ ] Requires data directory on base node to be deleted
- [ ] Requires hard fork
- [ ] Other - Please specify

<!-- Does this include a breaking change? If so, include this line as a
footer -->
<!-- BREAKING CHANGE: Description what the user should do, e.g. delete a
database, resync the chain -->
  • Loading branch information
leet4tari authored Feb 28, 2024
2 parents ee1b6d0 + d369637 commit 23e0628
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion routes/blocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ router.get("/:height_or_hash", async function (req, res) {
}

let tipInfo = await client.getTipInfo({});
let tipHeight = parseInt(tipInfo.metadata.height_of_longest_chain);
let tipHeight = parseInt(tipInfo.metadata.best_block_height);

let prevHeight = height - 1;
let prevLink = `/blocks/${prevHeight}`;
Expand Down
2 changes: 1 addition & 1 deletion routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ router.get("/", async function (req, res) {
]);

// list of active validator nodes
let tipHeight = tipInfo.metadata.height_of_longest_chain;
let tipHeight = tipInfo.metadata.best_block_height;
let activeVns = await client.getActiveValidatorNodes({
height: tipHeight,
});
Expand Down
4 changes: 2 additions & 2 deletions views/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
</thead>
<tbody>
<tr>
<td>{{this.tipInfo.metadata.height_of_longest_chain}}</td>
<td>{{hex this.tipInfo.metadata.best_block}}</td>
<td>{{this.tipInfo.metadata.best_block_height}}</td>
<td>{{hex this.tipInfo.metadata.best_block_hash}}</td>
<td>{{this.tipInfo.metadata.pruned_height}}</td>
<td>{{this.version}}</td>
</tr>
Expand Down

0 comments on commit 23e0628

Please sign in to comment.