mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-19 21:04:41 +00:00
Tidy, ensure head tracker is loaded from disk
This commit is contained in:
@@ -361,6 +361,7 @@ fn deposit_validator(
|
||||
|
||||
let log_1 = log.clone();
|
||||
let log_2 = log.clone();
|
||||
|
||||
web3.eth()
|
||||
.accounts()
|
||||
.map_err(|e| format!("Failed to get accounts: {:?}", e))
|
||||
@@ -385,7 +386,8 @@ fn deposit_validator(
|
||||
.then(move |result| match result {
|
||||
Ok(true) => Ok(from_address),
|
||||
Ok(false) => {
|
||||
Err("Eth1 node refused to unlock account".to_string())
|
||||
Err("Eth1 node refused to unlock account. Check password."
|
||||
.to_string())
|
||||
}
|
||||
Err(e) => Err(format!("Eth1 unlock request failed: {:?}", e)),
|
||||
});
|
||||
|
||||
@@ -10,7 +10,7 @@ use eth1::Config as Eth1Config;
|
||||
use lmd_ghost::{LmdGhost, ThreadSafeReducedTree};
|
||||
use operation_pool::OperationPool;
|
||||
use parking_lot::RwLock;
|
||||
use slog::{error, info, Logger};
|
||||
use slog::{info, Logger};
|
||||
use slot_clock::{SlotClock, TestingSlotClock};
|
||||
use std::marker::PhantomData;
|
||||
use std::sync::Arc;
|
||||
@@ -219,9 +219,10 @@ where
|
||||
|
||||
self.finalized_checkpoint = Some(p.finalized_checkpoint.clone());
|
||||
self.genesis_block_root = Some(p.genesis_block_root);
|
||||
self.head_tracker = HeadTracker::from_ssz_container(&p.ssz_head_tracker)
|
||||
.map_err(|e| error!(log, "Failed to decode head tracker for database: {:?}", e))
|
||||
.ok();
|
||||
self.head_tracker = Some(
|
||||
HeadTracker::from_ssz_container(&p.ssz_head_tracker)
|
||||
.map_err(|e| format!("Failed to decode head tracker for database: {:?}", e))?,
|
||||
);
|
||||
self.persisted_beacon_chain = Some(p);
|
||||
|
||||
Ok(self)
|
||||
|
||||
Reference in New Issue
Block a user