Skip to content

Commit

Permalink
fix(node): [#1849] fix reading persisted total_forwarded_rewards fr…
Browse files Browse the repository at this point in the history
…om file
  • Loading branch information
mickvandijke authored and RolandSherwin committed Jul 18, 2024
1 parent eb6a14d commit 3026b0a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sn_node/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,8 @@ impl Node {
#[cfg(all(feature = "reward-forward", feature = "open-metrics"))]
let _handle = spawn(async move {
let root_dir = node_copy.network().root_dir_path().clone();
let balance = read_forwarded_balance_value(&root_dir);
let balance_file_path = root_dir.join(FORWARDED_BALANCE_FILE_NAME);
let balance = read_forwarded_balance_value(&balance_file_path);

if let Some(node_metrics) = node_copy.node_metrics() {
let _ = node_metrics.total_forwarded_rewards.set(balance as i64);
Expand Down

0 comments on commit 3026b0a

Please sign in to comment.