Skip to content

Commit

Permalink
refactor: add a warning
Browse files Browse the repository at this point in the history
  • Loading branch information
fubuloubu committed Feb 2, 2023
1 parent 1e18ff2 commit 0126454
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/ape/api/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1005,6 +1005,13 @@ def get_transaction_by_account_nonce(
if start_nonce > stop_nonce:
raise ValueError("Starting nonce cannot be greater than stop nonce for search")

if self.network.name != "local":
logger.warning(
"Performing this action is likely to be very slow and may "
f"use {20 * (stop_nonce - start_nonce)} or more RPC calls. "
"Consider installing an alternative data query provider plugin."
)

start_block = 0
stop_block = self.chain_manager.blocks.head.number or 0
nonce_iter = iter(range(start_nonce, stop_nonce))
Expand Down

0 comments on commit 0126454

Please sign in to comment.