lightwalletd
lightwalletd copied to clipboard
Include next network upgrade height in `LightdInfo`
It is important for light clients to be able to notify their users of impending network upgrades that will require updates to their wallet software. Once a network upgrade height has been set in consensus configuration, the backing node should expose this data in a fashion that can propagate it to clients via the light wallet service.
The JSON-RPC method getblockchaininfo includes an upgrades section which specifies the list of known NUs, their activation heights, and their current status. What we'd be notifying of here is the first NU in sequence that has an activation height and "status": "pending".
getblockchaininfo also has a consensus section that says which of those NUs is the consensus branch ID for the current chain tip, and which one will be the consensus branch ID for the next (mempool) block, but that would only be one block of notice, and we should be able to provide more than that using the upgrades section.