Skip to content

Commit 202406d

Browse files
committed
Periodically update slot for accounts in memory
1 parent 8b6b0f4 commit 202406d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

geyser/handler_memory.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,8 @@ func (h *MemoryAccountWithDataUpdateHandler) onStateObserved(ctx context.Context
263263
if isInitialized {
264264
if cachedVirtualAccountState.IsInitialized &&
265265
cachedVirtualAccountState.Address == base58VirtualAccountAddress &&
266-
bytes.Equal(cachedVirtualAccountState.State, newVirtualAccountState) {
266+
bytes.Equal(cachedVirtualAccountState.State, newVirtualAccountState) &&
267+
observedAtSlot-cachedVirtualAccountState.Slot < 100 { // todo: configurable?
267268
continue
268269
}
269270

0 commit comments

Comments
 (0)