js-libs
js-libs copied to clipboard
light.js RPC call priotization
trafficstars
For simplicity, the balanceOf$.setFrequency() function has been removed, but it would be an idea to put it back.
The idea is:
- right now, each RpcObservable has its frequency fixed (i.e.
balanceOf$callseth_getBalanceon each new block). - now let's imagine a dapp that makes a huge amount of rpc calls. It would be nice to prioritize these calls.
- At least console.warn the dapp developer that there are too many rpc calls at the same time
- Let the dapp developer choose the frequency of each RpcObservable (e.g. some
eth_getBalancecan be called on every 2 blocks)