• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tari-project / tari / 14642108223

24 Apr 2025 12:52PM UTC coverage: 73.398% (+1.1%) from 72.346%
14642108223

push

github

web-flow
feat(grpc): return best block height from synced node (#6984)

Description
---
Adds `tip_height` and `local_height` to `get_sync_status`

Motivation and Context
---
TU checks flag `initial_sync_achieved` from `get_tip_info` and also
calls `get_sync_progress` to get `tip_height` but if
`initial_sync_achieved` is true then these 2 fields are 0 and we can't
check tip after syncing.

How Has This Been Tested?
---

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



Breaking Changes
---

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


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Bug Fixes**
- Improved accuracy of sync progress reporting by displaying the actual
best block height when the node is synced, instead of showing zero
values.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

81382 of 110877 relevant lines covered (73.4%)

279101.7 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/base_layer/core/src/chain_storage/active_validator_node.rs
1
//  Copyright 2022, The Tari Project
2
//
3
//  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
4
//  following conditions are met:
5
//
6
//  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following
7
//  disclaimer.
8
//
9
//  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
10
//  following disclaimer in the documentation and/or other materials provided with the distribution.
11
//
12
//  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote
13
//  products derived from this software without specific prior written permission.
14
//
15
//  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
16
//  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17
//  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18
//  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
19
//  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
20
//  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
21
//  USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22

23
use serde::{Deserialize, Serialize};
24
use tari_common_types::{
25
    epoch::VnEpoch,
26
    types::{CompressedCommitment, CompressedPublicKey},
27
};
28

29
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Default)]
×
30
pub struct ValidatorNodeEntry {
31
    pub shard_key: [u8; 32],
32
    pub start_epoch: VnEpoch,
33
    pub end_epoch: VnEpoch,
34
    pub public_key: CompressedPublicKey,
35
    pub commitment: CompressedCommitment,
36
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc