When syncing a node, the logs show a nice
⚙️ Syncing, target=#199957 (2 peers), best: #512 (0x5895…614e), finalized #512 (0x5895…614e), ⬇ 33.3kiB/s ⬆ 2.4kiB/s
However, I cannot find this target=#... number via RPC. In light-ui, where syncing can take some time, I'd like to show the target block.
I'm not 100% sure where to put it, maybe in system_health?
{
peers: number,
shouldHavePeers: boolean,
isSyncing: boolean,
// add this field:
syncing: { startBlock: number, currentBlock: number, targetblock: number } | null
}
Note: I copied how eth did it, for inspiration: https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_syncing
pinging maybe @tomusdrw @ascjones?