Commit Graph

12 Commits

Author SHA1 Message Date
Mark Spanbroek cb95cbc15a Make BlockHandler callback synchronous (breaking change)
Refactored the confirm() implementation to work
with a synchronous callback
2023-07-04 12:58:48 +02:00
Mark Spanbroek 82f6449374 Move JsonRpcSubscription type to jsonrpc module
Allows it to insert convertError to ensure that
any errors are re-raised as JsonRpcProviderError
2023-07-03 13:09:09 +02:00
Mark Spanbroek a27c2de41c Close provider by unsubscribing and closing client 2023-07-03 13:09:09 +02:00
Mark Spanbroek f8cac08cde Test that subscription stops after call to unsubscribe() 2023-07-03 13:09:09 +02:00
Mark Spanbroek 76bd3090d1 Fix intermittently failing test
eth_getFilterChanges returns the current block for
new subscriptions, which made the test fail.
2023-07-03 13:09:09 +02:00
Mark Spanbroek 1b151d589d Add polling interval to constructor of provider 2023-07-03 13:09:09 +02:00
Mark Spanbroek 88d60b14b0 Test JSON-RPC Provider with polling 2023-07-03 13:09:09 +02:00
Mark Spanbroek 3a76fa74f1 Make polling interval configurable 2023-07-03 13:09:09 +02:00
Mark Spanbroek beac903a3f Remove duplication in tests 2023-07-03 13:09:09 +02:00
Mark Spanbroek 6a034870f8 Polling block subscriptions for non-websocket connections 2023-07-03 13:09:09 +02:00
Mark Spanbroek a7dc0ac9eb Move subscription handling to its own module 2023-07-03 13:09:09 +02:00
Mark Spanbroek f0ac7065ed Move tests for JSON RPC provider into their own folder 2023-07-03 13:09:09 +02:00