Roman Volosovskyi c2f22f1fbc
[status-im/status-react#9927] Fast blocks sync after delay
- In order to avoid handling of the reorganized blocks we use an offset
from the latest known block when start listening to new blocks. Before
this commit the offset was 15 blocks for all networks. This offset is
too big for mainnet and causes noticeable delay of marking a transfer as
confirmed in Status (comparing to etherscan). So it was changed to be 5
blocks on mainnet and is still 15 blocks on other networks.
- Also before this commit all new blocks were handled one by one with
network specific interval (10s for mainnet), which means that in case of
lost internet connection or application suspension (happens on iOS)
receiving of new blocks would be paused and then resumed with the same
"speed" - 1 blocks per 10s. In case if that pause is big enough the
application would never catch up with the latest block in the network,
and this also causes the state of transfers to be delayed in the
application. In this commit in case if there was more than 40s delay
after receiving of the previous block the whole history in range between
the previous received block and ("latest"-reorgeSafetyDepth) block is
checked at once and app catches up with a recent state of the chain.
2020-01-30 17:25:56 +02:00
..
2020-01-06 10:17:23 +01:00
2020-01-29 20:40:06 +01:00
2020-01-20 13:15:17 +01:00
2020-01-20 13:15:17 +01:00
2020-01-06 10:17:23 +01:00
2020-01-06 10:17:23 +01:00
2020-01-20 13:15:17 +01:00
2020-01-29 20:40:06 +01:00
2020-01-20 13:15:17 +01:00
2020-01-06 10:17:23 +01:00
2018-06-25 15:27:17 +02:00