@@ -49,6 +49,7 @@ def data_group() -> None:
49
49
50
50
51
51
def print_date (* args : Any , ** kwargs : Any ) -> None :
52
+ kwargs .setdefault ("flush" , True )
52
53
s = datetime .datetime .now (datetime .timezone .utc ).isoformat (timespec = "seconds" )
53
54
print (f"{ s } :" , * args , ** kwargs )
54
55
@@ -105,6 +106,10 @@ async def run(self) -> None:
105
106
database_path = working_path .joinpath ("datalayer.sqlite" )
106
107
print_date (f"working with database at: { database_path } " )
107
108
109
+ wallet_client_info = await exit_stack .enter_async_context (self .wallet_rpc_info .wallet_rpc ())
110
+ wallet_rpc = wallet_client_info .client
111
+ await wallet_rpc .dl_track_new (launcher_id = self .store_id )
112
+
108
113
data_store = await exit_stack .enter_async_context (DataStore .managed (database = database_path ))
109
114
110
115
await data_store .subscribe (subscription = Subscription (store_id = self .store_id , servers_info = []))
@@ -114,15 +119,16 @@ async def run(self) -> None:
114
119
115
120
print_date ("subscribed" )
116
121
117
- wallet_client_info = await exit_stack .enter_async_context (self .wallet_rpc_info .wallet_rpc ())
118
- wallet_rpc = wallet_client_info .client
119
-
120
122
to_download = await wallet_rpc .dl_history (
121
123
launcher_id = self .store_id ,
122
124
min_generation = uint32 (1 ),
123
125
max_generation = uint32 (self .generation_limit + 1 ),
124
126
)
125
127
128
+ print_date (
129
+ f"found generations to download: { to_download [- 1 ].generation } -> { to_download [0 ].generation } "
130
+ )
131
+
126
132
root_hashes = [record .root for record in reversed (to_download )]
127
133
128
134
files_path = server_files_path_from_config (config = config , root_path = self .context .root_path )
0 commit comments