File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,10 @@ def _query_current_epoch(self) -> int:
100
100
args = {"query" : "currentEpoch" }
101
101
return self ._request (OgmiosQueryType .Query , args )
102
102
103
+ def _query_chain_tip (self ) -> JSON :
104
+ args = {"query" : "chainTip" }
105
+ return self ._request (OgmiosQueryType .Query , args )["slot" ]
106
+
103
107
def _check_chain_tip_and_update (self ):
104
108
slot = self .last_block_slot
105
109
if self ._last_known_block_slot != slot :
@@ -204,8 +208,8 @@ def epoch(self) -> int:
204
208
@property
205
209
def last_block_slot (self ) -> int :
206
210
"""Slot number of last block"""
207
- args = { "query" : "chainTip" }
208
- return self . _request ( OgmiosQueryType . Query , args ) ["slot" ]
211
+ result = self . _query_chain_tip ()
212
+ return result ["slot" ]
209
213
210
214
def _extract_asset_info (self , asset_hash : str ) -> Tuple [str , ScriptHash , AssetName ]:
211
215
policy_hex , asset_name_hex = asset_hash .split ("." )
You can’t perform that action at this time.
0 commit comments