Skip to content

Commit

Permalink
chore: remove unused slashed substate (#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrwbabylonlab authored Nov 30, 2024
1 parent 3948383 commit ac9bd98
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 24 deletions.
10 changes: 4 additions & 6 deletions docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -1350,6 +1350,7 @@ const docTemplate = `{
"PENDING",
"VERIFIED",
"ACTIVE",
"SLASHED",
"TIMELOCK_UNBONDING",
"EARLY_UNBONDING",
"TIMELOCK_WITHDRAWABLE",
Expand All @@ -1359,14 +1360,13 @@ const docTemplate = `{
"TIMELOCK_WITHDRAWN",
"EARLY_UNBONDING_WITHDRAWN",
"TIMELOCK_SLASHING_WITHDRAWN",
"EARLY_UNBONDING_SLASHING_WITHDRAWN",
"TIMELOCK_SLASHED",
"EARLY_UNBONDING_SLASHED"
"EARLY_UNBONDING_SLASHING_WITHDRAWN"
],
"x-enum-varnames": [
"StatePending",
"StateVerified",
"StateActive",
"StateSlashed",
"StateTimelockUnbonding",
"StateEarlyUnbonding",
"StateTimelockWithdrawable",
Expand All @@ -1376,9 +1376,7 @@ const docTemplate = `{
"StateTimelockWithdrawn",
"StateEarlyUnbondingWithdrawn",
"StateTimelockSlashingWithdrawn",
"StateEarlyUnbondingSlashingWithdrawn",
"StateTimelockSlashed",
"StateEarlyUnbondingSlashed"
"StateEarlyUnbondingSlashingWithdrawn"
]
}
}
Expand Down
10 changes: 4 additions & 6 deletions docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -1342,6 +1342,7 @@
"PENDING",
"VERIFIED",
"ACTIVE",
"SLASHED",
"TIMELOCK_UNBONDING",
"EARLY_UNBONDING",
"TIMELOCK_WITHDRAWABLE",
Expand All @@ -1351,14 +1352,13 @@
"TIMELOCK_WITHDRAWN",
"EARLY_UNBONDING_WITHDRAWN",
"TIMELOCK_SLASHING_WITHDRAWN",
"EARLY_UNBONDING_SLASHING_WITHDRAWN",
"TIMELOCK_SLASHED",
"EARLY_UNBONDING_SLASHED"
"EARLY_UNBONDING_SLASHING_WITHDRAWN"
],
"x-enum-varnames": [
"StatePending",
"StateVerified",
"StateActive",
"StateSlashed",
"StateTimelockUnbonding",
"StateEarlyUnbonding",
"StateTimelockWithdrawable",
Expand All @@ -1368,9 +1368,7 @@
"StateTimelockWithdrawn",
"StateEarlyUnbondingWithdrawn",
"StateTimelockSlashingWithdrawn",
"StateEarlyUnbondingSlashingWithdrawn",
"StateTimelockSlashed",
"StateEarlyUnbondingSlashed"
"StateEarlyUnbondingSlashingWithdrawn"
]
}
}
Expand Down
6 changes: 2 additions & 4 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,7 @@ definitions:
- PENDING
- VERIFIED
- ACTIVE
- SLASHED
- TIMELOCK_UNBONDING
- EARLY_UNBONDING
- TIMELOCK_WITHDRAWABLE
Expand All @@ -479,13 +480,12 @@ definitions:
- EARLY_UNBONDING_WITHDRAWN
- TIMELOCK_SLASHING_WITHDRAWN
- EARLY_UNBONDING_SLASHING_WITHDRAWN
- TIMELOCK_SLASHED
- EARLY_UNBONDING_SLASHED
type: string
x-enum-varnames:
- StatePending
- StateVerified
- StateActive
- StateSlashed
- StateTimelockUnbonding
- StateEarlyUnbonding
- StateTimelockWithdrawable
Expand All @@ -496,8 +496,6 @@ definitions:
- StateEarlyUnbondingWithdrawn
- StateTimelockSlashingWithdrawn
- StateEarlyUnbondingSlashingWithdrawn
- StateTimelockSlashed
- StateEarlyUnbondingSlashed
info:
contact:
email: contact@babylonlabs.io
Expand Down
4 changes: 0 additions & 4 deletions internal/v2/types/delegation_states.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ const (
StateEarlyUnbondingWithdrawn DelegationState = "EARLY_UNBONDING_WITHDRAWN"
StateTimelockSlashingWithdrawn DelegationState = "TIMELOCK_SLASHING_WITHDRAWN"
StateEarlyUnbondingSlashingWithdrawn DelegationState = "EARLY_UNBONDING_SLASHING_WITHDRAWN"

// Slashed states
StateTimelockSlashed DelegationState = "TIMELOCK_SLASHED"
StateEarlyUnbondingSlashed DelegationState = "EARLY_UNBONDING_SLASHED"
)

// MapDelegationState consumes internal indexer states and maps them to the frontend-facing states
Expand Down
2 changes: 1 addition & 1 deletion tests/mocks/mock_db_client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/mocks/mock_ordinal_client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/mocks/mock_v1_db_client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/mocks/mock_v2_db_client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ac9bd98

Please sign in to comment.