node
node copied to clipboard
refactor: consider having a separate ticker/thread(from TSS intx observation) for posting block headers
Describe the Issue
Here is the current code with the TODO notation.
Expected Outcome
Instead of embedding block header posting logic in function observeTssRecvd, we should have a separate/dedicated job or thread for that purpose.
Reason
The job of observeTssRecvd scans incoming txs to TSS address in block range [startBlock, toBlock] which will not be always the correct range for block header posting. Adding block header to zetacore is a very sequential process in zetacore and usually slower than inbound tx observation which is posting discrete votes. Decoupling the two makes code more maintainable and less error prone.