Derrick Hammer
|
d3664c8d23
|
fix: don't release lock when we have cached optimistic update data, as we never locked it
|
2023-07-24 11:12:52 -04:00 |
Derrick Hammer
|
0321136ac0
|
feat: add synced event
|
2023-07-23 12:01:10 -04:00 |
Derrick Hammer
|
87e7533dcf
|
fix: change argument to be the current update, not the 0 index
|
2023-07-23 10:18:16 -04:00 |
Derrick Hammer
|
02412ba934
|
refactor: change update event to just pass currently processed event and the total number
|
2023-07-23 10:17:08 -04:00 |
Derrick Hammer
|
232af830c9
|
feat: use event emitter and emit "update" on every light client update processed
|
2023-07-23 10:06:18 -04:00 |
Derrick Hammer
|
fbfb9c1e06
|
refactor: remove block check from isSynced
|
2023-07-15 00:18:15 -04:00 |
Derrick Hammer
|
a901ee76f4
|
feat: add loggerInfo and loggerErr callbacks to client options
|
2023-07-14 11:16:38 -04:00 |
Derrick Hammer
|
824dcd9633
|
fix: add a sync delay option so that the bls verification does not hog cpu
|
2023-07-14 09:21:52 -04:00 |
Derrick Hammer
|
e567d5017d
|
refactor: call getLatestExecution in sync and add an arg to getLatestExecution to skip syncing
|
2023-07-13 04:35:29 -04:00 |
Derrick Hammer
|
f68688ab61
|
refactor: have isSynced check the period and the block
|
2023-07-13 04:32:18 -04:00 |
Derrick Hammer
|
661e146636
|
feat: add getCurrentBlock and getLastBlock methods
|
2023-07-13 04:31:55 -04:00 |
Derrick Hammer
|
93ab07c5c3
|
refactor: make getLatestExecution public
|
2023-07-13 04:05:34 -04:00 |
Derrick Hammer
|
391a4f968a
|
refactor: if we have a _latestOptimisticUpdate, check the estimated current block against the block we have, and return it as cached data if we don't need to fetch again. Also use a mutex to prevent race conditions
|
2023-07-13 04:00:42 -04:00 |
Derrick Hammer
|
36f9f4c910
|
tidy: unneeded var
|
2023-07-13 03:47:44 -04:00 |
Derrick Hammer
|
11791ff08b
|
refactor: split subscribe into syncToLatestBlock
|
2023-07-13 03:18:05 -04:00 |
Derrick Hammer
|
4836ddb32e
|
style: reformat
|
2023-07-13 03:14:06 -04:00 |
Derrick Hammer
|
b3e5607132
|
refactor: store optimistic update back into _latestOptimisticUpdate with a getter.
|
2023-07-13 03:13:22 -04:00 |
Derrick Hammer
|
a7786fa21c
|
style: fix typos
|
2023-07-13 03:12:49 -04:00 |
Derrick Hammer
|
977d33b768
|
refactor: make optimisticUpdateCallback a dedicated type
|
2023-07-13 02:53:00 -04:00 |
Derrick Hammer
|
51d6d23942
|
refactor: getLatestExecution needs to actually call optimistic update, but add a callback in the client options to avoid creating a subclass
|
2023-07-13 02:25:05 -04:00 |
Derrick Hammer
|
5aa37d4a61
|
refactor: don't use un-needed for loop
|
2023-07-13 01:46:45 -04:00 |
Derrick Hammer
|
baa9562749
|
fix: fix import
|
2023-07-12 17:59:56 -04:00 |
Derrick Hammer
|
6408098050
|
refactor: heavily simplify and consolidate implementations to just use light sync updates and not the optimistic_update endpoint, and use a generic callback interface
|
2023-07-12 17:40:59 -04:00 |
Derrick Hammer
|
a6759ec243
|
refactor: temp use js only bls
|
2023-07-11 02:33:28 -04:00 |
Derrick Hammer
|
208ca03e80
|
refactor: expose subscribe on the base client, with optional callback and call on child clients
|
2023-07-11 02:21:30 -04:00 |
Derrick Hammer
|
3a48a52a53
|
fix: add getter for store in baseclient
|
2023-07-11 01:01:10 -04:00 |
Derrick Hammer
|
5843acb79b
|
feat: Initial version
|
2023-07-10 16:47:50 -04:00 |