Change accumulated reward to Option, migrate delegations (#1147)

* Change accumulated reward to Option, migrate delegations

* Remove interval from the validator cache

* Add info to db errors

* Remove interval fetch from the contract

* Rework epochs

* Fix undelegation errors

* Emit error event instead of error

* make no-clippy

* Fix clippy lints
This commit is contained in:
Drazen Urch
2022-03-17 12:03:05 +01:00
committed by GitHub
parent f9a154b36c
commit f24d6e224d
58 changed files with 589 additions and 671 deletions
+3 -3
View File
@@ -239,7 +239,7 @@ pub enum ValidatorApiStorageError {
GatewayUptimeHistoryNotFound(String),
// I don't think we want to expose errors to the user about what really happened
InternalDatabaseError,
InternalDatabaseError(String),
}
impl Display for ValidatorApiStorageError {
@@ -265,8 +265,8 @@ impl Display for ValidatorApiStorageError {
"Could not find uptime history associated with gateway {}",
identity
),
ValidatorApiStorageError::InternalDatabaseError => {
write!(f, "The internal database has experienced an issue")
ValidatorApiStorageError::InternalDatabaseError(err) => {
write!(f, "The internal database has experienced an issue: {err}")
}
}
}