cache registry reverses in local storage (#4182)
* cache reverses in localStorage * bugfixes 🐛, linting fixes 👕 * registry caching: store last block * registry caching: store per chain * localStorage -> store * code style ✨ * code style 👕
This commit is contained in:
committed by
Jaco Greeff
parent
f12bd17c20
commit
df9110dd5e
@@ -111,4 +111,15 @@ describe('util/subscribe-to-events', () => {
|
||||
expect(onBar.callCount).to.be.at.least(1);
|
||||
expect(onBar.firstCall.args).to.eql([ liveLogs[0] ]);
|
||||
});
|
||||
|
||||
it('accepts a custom block range', async function () {
|
||||
const { api, contract } = this;
|
||||
|
||||
subscribeToEvents(contract, [ 'Foo' ], { from: 123, to: 321 });
|
||||
|
||||
await delay(0);
|
||||
expect(api.eth.newFilter.callCount).to.equal(1);
|
||||
expect(api.eth.newFilter.firstCall.args[0].fromBlock).to.equal(123);
|
||||
expect(api.eth.newFilter.firstCall.args[0].toBlock).to.equal(321);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user