Skip to content

Commit

Permalink
Add support for non-mainnet request cache validation thresholds:
Browse files Browse the repository at this point in the history
- If non-mainnet ethereum, allow the use of an integer value for the
  request cache validation threshold. Pre-configure "safe" default
  values for some common non-mainnet chain ids based on their
  varied finality mechanisms.

- This integer value represents the number of seconds from time.now()
  that the request cache deems as a safe enough time window to allow
  the request to be cached.

- Update the tests to reflect these changes.

Bonus:

- Add a note to the ``request_mocker`` to make sure that mocked results
  are of the correct expected types based on JSON-RPC spec (e.g. hex
  strings instead of ints for numbers, etc.)
  • Loading branch information
fselmo committed Oct 15, 2024
1 parent 8125b3b commit 89d9a88
Show file tree
Hide file tree
Showing 6 changed files with 431 additions and 131 deletions.
Loading

0 comments on commit 89d9a88

Please sign in to comment.