Skip to content

Commit dfdde18

Browse files
committed
Put eth/beacon/enums/ objects in one file
1 parent 6fa7b83 commit dfdde18

File tree

10 files changed

+26
-36
lines changed

10 files changed

+26
-36
lines changed

eth/beacon/enums.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
from enum import IntEnum
2+
3+
4+
class ValidatorStatusCode(IntEnum):
5+
PENDING_ACTIVATION = 0
6+
ACTIVE = 1
7+
PENDING_EXIT = 2
8+
EXITED_WITHOUT_PENALTY = 3
9+
EXITED_WITH_PENALTY = 4
10+
11+
12+
class ValidatorRegistryDeltaFlag(IntEnum):
13+
ACTIVATION = 0
14+
EXIT = 1
15+
16+
17+
class SignatureDomain(IntEnum):
18+
DOMAIN_DEPOSIT = 0
19+
DOMAIN_ATTESTATION = 1
20+
DOMAIN_PROPOSAL = 2
21+
DOMAIN_LOGOUT = 3

eth/beacon/enums/__init__.py

Whitespace-only changes.

eth/beacon/enums/signature_domain.py

Lines changed: 0 additions & 8 deletions
This file was deleted.

eth/beacon/enums/special_record_types.py

Lines changed: 0 additions & 8 deletions
This file was deleted.

eth/beacon/enums/validator_registry_delta_flags.py

Lines changed: 0 additions & 6 deletions
This file was deleted.

eth/beacon/enums/validator_status_codes.py

Lines changed: 0 additions & 9 deletions
This file was deleted.

eth/beacon/helpers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
)
2929

3030
from eth.beacon.block_committees_info import BlockCommitteesInfo
31-
from eth.beacon.enums.validator_status_codes import (
31+
from eth.beacon.enums import (
3232
ValidatorStatusCode,
3333
)
3434
from eth.beacon.types.shard_committees import (
@@ -41,7 +41,7 @@
4141

4242

4343
if TYPE_CHECKING:
44-
from eth.beacon.enums.signature_domain import SignatureDomain # noqa: F401
44+
from eth.beacon.enums import SignatureDomain # noqa: F401
4545
from eth.beacon.types.attestation_records import AttestationRecord # noqa: F401
4646
from eth.beacon.types.blocks import BaseBeaconBlock # noqa: F401
4747
from eth.beacon.types.states import BeaconState # noqa: F401

tests/beacon/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import eth.utils.bls as bls
1010
from eth.utils.blake import blake
1111

12-
from eth.beacon.enums.validator_status_codes import (
12+
from eth.beacon.enums import (
1313
ValidatorStatusCode,
1414
)
1515
from eth.beacon.state_machines.forks.serenity.configs import SERENITY_CONFIG

tests/beacon/helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from eth.beacon.enums.validator_status_codes import (
1+
from eth.beacon.enums import (
22
ValidatorStatusCode,
33
)
44
from eth.beacon.types.validator_records import (

tests/beacon/test_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
)
1111

1212

13-
from eth.beacon.enums.validator_status_codes import (
13+
from eth.beacon.enums import (
1414
ValidatorStatusCode,
1515
)
1616
from eth.beacon.types.blocks import BaseBeaconBlock

0 commit comments

Comments
 (0)