File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -56,17 +56,19 @@ def __init__(
56
56
network : Network ,
57
57
compact_result = True ,
58
58
kupo_url = None ,
59
- refetch_chain_tip_interval = 20 ,
59
+ refetch_chain_tip_interval : Optional [ int ] = None ,
60
60
):
61
61
self ._ws_url = ws_url
62
62
self ._network = network
63
63
self ._service_name = "ogmios.v1:compact" if compact_result else "ogmios"
64
64
self ._kupo_url = kupo_url
65
65
self ._last_known_block_slot = 0
66
- self ._refetch_chain_tip_interval = refetch_chain_tip_interval
66
+ self ._refetch_chain_tip_interval = refetch_chain_tip_interval if refetch_chain_tip_interval is not None else 1000
67
67
self ._last_chain_tip_fetch = 0
68
68
self ._genesis_param = None
69
69
self ._protocol_param = None
70
+ if refetch_chain_tip_interval is None :
71
+ self ._refetch_chain_tip_interval = self .genesis_param .slot_length / self .genesis_param .active_slots_coefficient
70
72
71
73
def _request (self , method : OgmiosQueryType , args : JsonDict ) -> Any :
72
74
ws = websocket .WebSocket ()
You can’t perform that action at this time.
0 commit comments