bodhiproject / bodhi-ui

ReactJS frontend that interacts with the Bodhi backend services
GNU Lesser General Public License v3.0
18 stars 5 forks source link

Remove calculateWinnings and getDidWithdraw requests every 5 blocks #1531

Closed dwalintukan closed 5 years ago

dwalintukan commented 5 years ago

This is getting too spammy for the server. Please change the following logic:

BernardHan commented 5 years ago

@dwalintukan What happens currently is that if the event page is in withdraw, calculateWinnings and didWithdraw will be called in initEvent. And will never be called again unless:

  1. user goes from offline to online
  2. there're pending txs, which is not likely if it's in withdraw phase

In the two methods, you did add the line if the block number cannot divided by 5 fully, then return. But this line has no effect after we remove all pulling data on new block.

I think this issue can be closed.

dwalintukan commented 5 years ago

Got it. Hm must have been multiple people calling it then. Closing.