Fixed Payload Deserialization in DB (#3758)

This commit is contained in:
ethDreamer
2022-11-29 17:27:13 -06:00
committed by GitHub
parent 788b337951
commit 342489a0c3
2 changed files with 29 additions and 3 deletions

View File

@@ -3,7 +3,7 @@ use crate::config::StoreConfigError;
use crate::hot_cold_store::HotColdDBError;
use ssz::DecodeError;
use state_processing::BlockReplayError;
use types::{BeaconStateError, Hash256, Slot};
use types::{BeaconStateError, Hash256, InconsistentFork, Slot};
pub type Result<T> = std::result::Result<T, Error>;
@@ -45,6 +45,7 @@ pub enum Error {
ResyncRequiredForExecutionPayloadSeparation,
SlotClockUnavailableForMigration,
V9MigrationFailure(Hash256),
InconsistentFork(InconsistentFork),
}
pub trait HandleUnavailable<T> {
@@ -103,6 +104,12 @@ impl From<BlockReplayError> for Error {
}
}
impl From<InconsistentFork> for Error {
fn from(e: InconsistentFork) -> Error {
Error::InconsistentFork(e)
}
}
#[derive(Debug)]
pub struct DBError {
pub message: String,