From 1268d3308336b88830c2d3214346d51727754c22 Mon Sep 17 00:00:00 2001 From: Denio Date: Mon, 2 Dec 2019 11:43:40 +0100 Subject: [PATCH] add longestchain and notarized to lightinfod --- cli/src/lib.rs | 1 - lib/proto/service.proto | 2 ++ lib/src/lightclient.rs | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cli/src/lib.rs b/cli/src/lib.rs index 7a3a2f1..49790b5 100644 --- a/cli/src/lib.rs +++ b/cli/src/lib.rs @@ -238,7 +238,6 @@ pub fn attempt_recover_seed() { server: "0.0.0.0:0".parse().unwrap(), chain_name: "main".to_string(), sapling_activation_height: 0, - // difficulty: 0, consensus_branch_id: "000000".to_string(), anchor_offset: 0, no_cert_verification: false, diff --git a/lib/proto/service.proto b/lib/proto/service.proto index 4eb4844..322e56b 100644 --- a/lib/proto/service.proto +++ b/lib/proto/service.proto @@ -53,6 +53,8 @@ message LightdInfo { string consensusBranchId = 6; // This should really be u32 or []byte, but string for readability uint64 blockHeight = 7; uint64 difficulty = 8; + uint64 longestchain = 9; + uint64 notarized = 10; } message TransparentAddress { diff --git a/lib/src/lightclient.rs b/lib/src/lightclient.rs index 9efb43e..5da1433 100644 --- a/lib/src/lightclient.rs +++ b/lib/src/lightclient.rs @@ -102,7 +102,6 @@ impl LightClientConfig { chain_name : info.chain_name, sapling_activation_height : info.sapling_activation_height, consensus_branch_id : info.consensus_branch_id, - //difficulty : info.difficulty, anchor_offset : ANCHOR_OFFSET, no_cert_verification : dangerous, data_dir : None, @@ -595,6 +594,8 @@ impl LightClient { "consensus_branch_id" => i.consensus_branch_id, "latest_block_height" => i.block_height, "difficulty" => i.difficulty, + "longestchain" => i.longestchain, + "notarized" => i.notarized, }; o.pretty(2) },