Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Delegate monitor : optimize getting delegates last block #214
In the algorithm to get the delegates last block (in activeDelegates function), we check first in the 100 latest blocks if we find it, if not we make a server request (so for each delegate who hasn't forged in the last 100 blocks) to get it.
In order to limit the amount of requests, we are here caching locally (sessionStorage) the delegates last blocks. So that when the timer refreshes, we are not requesting again a delegate's last block if we have it cached and if it is not necessary to refresh it.
Related to #195