Skip to content

Commit

Permalink
relax slot comparisons
Browse files Browse the repository at this point in the history
  • Loading branch information
crispheaney committed Dec 5, 2023
1 parent 2cae1c6 commit 4021da7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/driftpy/accounts/bulk_account_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ async def load_chunk(self, chunk: List[List[AccountToLoad]]):
pubkey_str = str(account_to_load.pubkey)
old_buffer_and_slot = self.buffer_and_slot_map.get(pubkey_str)

if old_buffer_and_slot is not None and slot <= old_buffer_and_slot.slot:
if old_buffer_and_slot is not None and slot < old_buffer_and_slot.slot:
continue

new_buffer = None
Expand Down
2 changes: 1 addition & 1 deletion src/driftpy/accounts/ws/account_subscriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def _update_data(self, new_data: Optional[DataAndSlot[T]]):
if new_data is None:
return

if self.data_and_slot is None or new_data.slot > self.data_and_slot.slot:
if self.data_and_slot is None or new_data.slot >= self.data_and_slot.slot:
self.data_and_slot = new_data

def unsubscribe(self):
Expand Down

0 comments on commit 4021da7

Please sign in to comment.