ADD: api endpoint to query the latest block heights
When a new observer starts, or when an exist observer restart, it will need to continue to observe binance chain from where it stopped last time.
Additionally when a new signer starts or restarts, it also needs to know the latest signed block height.
- extend TxIn to add block height of binance chain
- update statechain logic to save last finalised block height of binance chain it received.
- update statechain logic to save last finalised block height of signed statechain txoutarray.
- add an api endpoint, like
/swapservice/lastblockthat returns:
{
"lastobservedin" : "12345",
"lastsignedout" : "1233",
"statechain" : "1234"
}
Note: Add the block height from the statechain, since the Signer will need this to be aware of unsigned transaction arrays, of which there may be multiple.
Edited by JP