Skip to content

The height inside the startLightClientFromGenesis function  #5

@jaybxyz

Description

@jaybxyz

The height is defined as 1 inside the startLightClientFromGenesis function in the lotion-connect module.

Isn't that variable supposed to be getting from a full node's state?

let tendermint = require('tendermint')

function startLightClientFromGenesis(genesis, nodeAddress) {
  return new Promise((resolve, reject) => {
    let clientState = {
      validators: genesis.validators,
      commit: null,
      header: { height: 1, chain_id: genesis.chain_id } // Here height is 1 always
    }

    let lc = tendermint(nodeAddress, clientState)
    lc.on('update', function(header) {})
    lc.on('error', function(err) {})

    resolve(lc)
  })
}

module.exports = startLightClientFromGenesis

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions