Skip to content

writeStateDiffAt writes all statediffs even when watching specific addresses in direct indexing #261

@prathamesh0

Description

@prathamesh0
  • Statediff APIs (like writeStateDiffAt) take statediff params as an argument. If WatchedAddresses field in these params argument is not set when making the API call, statediffs for all the addresses are written out even when direct indexing is restricted to a list of addresses.
  • If a watcher for some contract is running near chain head (with direct indexing configured to watch that contract), it may make writeStateDiffAt calls before direct indexing for that block is completed. As a consequence, statediffs for all the addresses get indexed unnecessarily.
  • When WatchedAddresses is not explicitly set in the passed arguments, use watched addresses from direct indexing params while serving statediff API calls.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions