File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -261,6 +261,7 @@ async def __create_snapshot_handler(
261
261
# TODO: Migrate these to parameters (remove explicitly from state)
262
262
last_block_seen = self .state .get ("system:last_block_seen" , - 1 ),
263
263
last_block_processed = self .state .get ("system:last_block_processed" , - 1 ),
264
+ last_nonce_used = self .state .get ("system:last_nonce_used" ),
264
265
)
265
266
266
267
# To ensure we don't have too many forks at once
@@ -271,7 +272,7 @@ def nonce(self) -> int:
271
272
if not self .signer :
272
273
raise NoSignerLoaded ()
273
274
274
- elif not (last_nonce_used := self .state [ "system:last_nonce_used" ]) :
275
+ elif (last_nonce_used := self .state . get ( "system:last_nonce_used" )) is None :
275
276
raise AttributeError (
276
277
"`bot.state` not fully loaded yet, please do not use during worker startup."
277
278
)
You can’t perform that action at this time.
0 commit comments