diff --git a/eth2/validator_client/beacon_node.py b/eth2/validator_client/beacon_node.py index f3dd8252df..c244def65d 100644 --- a/eth2/validator_client/beacon_node.py +++ b/eth2/validator_client/beacon_node.py @@ -34,7 +34,7 @@ Duty, DutyType, ) -from trinity.exceptions import BeaconNodeRequestFailure +from eth2.validator_client.exceptions import BeaconNodeRequestFailure SYNCING_POLL_INTERVAL = 10 # seconds CONNECTION_RETRY_INTERVAL = 1 # second(s) diff --git a/eth2/validator_client/duty_scheduler.py b/eth2/validator_client/duty_scheduler.py index 6ae895ad4f..0061913fa1 100644 --- a/eth2/validator_client/duty_scheduler.py +++ b/eth2/validator_client/duty_scheduler.py @@ -9,8 +9,8 @@ from eth2.validator_client.abc import BeaconNodeAPI from eth2.validator_client.duty import AttestationDuty, Duty, DutyType from eth2.validator_client.duty_store import DutyStore +from eth2.validator_client.exceptions import BeaconNodeRequestFailure from eth2.validator_client.typing import RandaoProvider, ResolvedDuty -from trinity.exceptions import BeaconNodeRequestFailure logger = logging.getLogger("eth2.validator_client.duty_scheduler") diff --git a/eth2/validator_client/exceptions.py b/eth2/validator_client/exceptions.py new file mode 100644 index 0000000000..c17def0c7f --- /dev/null +++ b/eth2/validator_client/exceptions.py @@ -0,0 +1,6 @@ +class BeaconNodeRequestFailure(Exception): + """ + Raised when a Beacon Node request fails. + """ + + pass diff --git a/eth2/validator_client/signatory.py b/eth2/validator_client/signatory.py index b2f6bf6e6a..4a82aa4517 100644 --- a/eth2/validator_client/signatory.py +++ b/eth2/validator_client/signatory.py @@ -13,8 +13,8 @@ from eth2.beacon.typing import Operation, SignedOperation from eth2.validator_client.abc import BeaconNodeAPI, SignatoryDatabaseAPI from eth2.validator_client.duty import Duty, DutyType +from eth2.validator_client.exceptions import BeaconNodeRequestFailure from eth2.validator_client.typing import PrivateKeyProvider -from trinity.exceptions import BeaconNodeRequestFailure logger = logging.getLogger("eth2.validator_client.signatory") diff --git a/trinity/exceptions.py b/trinity/exceptions.py index f4c4bf87a9..2d44c505c9 100644 --- a/trinity/exceptions.py +++ b/trinity/exceptions.py @@ -148,10 +148,3 @@ class MetricsReportingError(BaseTrinityError): Raised when there is an error while reporting metrics. """ pass - - -class BeaconNodeRequestFailure(BaseTrinityError): - """ - Raised when a request made to a Beacon Node fails. - """ - pass