add difficulty to lightdinfo

This commit is contained in:
Denio
2019-12-02 10:35:38 +01:00
parent a0513c48c3
commit a269cd1e6b
5 changed files with 18 additions and 8 deletions

View File

@@ -229,7 +229,7 @@ func (s *SqlStreamer) GetTransaction(ctx context.Context, txf *walletrpc.TxFilte
// GetLightdInfo gets the LightWalletD (this server) info
func (s *SqlStreamer) GetLightdInfo(ctx context.Context, in *walletrpc.Empty) (*walletrpc.LightdInfo, error) {
saplingHeight, blockHeight, chainName, consensusBranchId, err := common.GetSaplingInfo(s.client)
saplingHeight, blockHeight, chainName, consensusBranchId, difficulty, err := common.GetSaplingInfo(s.client)
if err != nil {
s.log.WithFields(logrus.Fields{
@@ -248,6 +248,7 @@ func (s *SqlStreamer) GetLightdInfo(ctx context.Context, in *walletrpc.Empty) (*
SaplingActivationHeight: uint64(saplingHeight),
ConsensusBranchId: consensusBranchId,
BlockHeight: uint64(blockHeight),
Difficulty: uint64(difficulty),
}, nil
}