Fix db metadata updates for existing headers (#9403)

* Fix metadata updates on existing headers

* Fail set_head on ancient blocks

* Fmt unrelated code
This commit is contained in:
Arkadiy Paronyan
2021-07-21 22:35:58 +02:00
committed by GitHub
parent ec6d711b38
commit c5f5c9c28c
2 changed files with 111 additions and 60 deletions
@@ -156,6 +156,9 @@ pub enum Error {
#[error("State Database error: {0}")]
StateDatabase(String),
#[error("Failed to set the chain head to a block that's too old.")]
SetHeadTooOld,
#[error(transparent)]
Application(#[from] Box<dyn std::error::Error + Send + Sync + 'static>),