add longestchain and notarized to lightinfod

This commit is contained in:
Denio
2019-12-02 11:42:50 +01:00
parent a269cd1e6b
commit 0978322f62
5 changed files with 30 additions and 10 deletions

View File

@@ -348,6 +348,8 @@ type LightdInfo struct {
ConsensusBranchId string `protobuf:"bytes,6,opt,name=consensusBranchId,proto3" json:"consensusBranchId,omitempty"`
BlockHeight uint64 `protobuf:"varint,7,opt,name=blockHeight,proto3" json:"blockHeight,omitempty"`
Difficulty uint64 `protobuf:"varint,8,opt,name=difficulty,proto3" json:"difficulty,omitempty"`
Longestchain uint64 `protobuf:"varint,9,opt,name=longestchain,proto3" json:"longestchain,omitempty"`
Notarized uint64 `protobuf:"varint,10,opt,name=notarized,proto3" json:"notarized,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -425,6 +427,18 @@ func (m *LightdInfo) Getdifficulty() uint64 {
}
return 0
}
func (m *LightdInfo) Getlongestchain() uint64 {
if m != nil {
return m.Longestchain
}
return 0
}
func (m *LightdInfo) Getnotarized() uint64 {
if m != nil {
return m.Notarized
}
return 0
}
func (m *LightdInfo) GetBlockHeight() uint64 {
if m != nil {

View File

@@ -52,7 +52,9 @@ message LightdInfo {
uint64 saplingActivationHeight = 5;
string consensusBranchId = 6; // This should really be u32 or []byte, but string for readability
uint64 blockHeight = 7;
string difficulty = 8;
uint64 difficulty = 8;
uint64 longestchain = 9;
uint64 notarized = 10;
}
message TransparentAddress {