mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Unimplement TreeHash for BeaconState (#6083)
* Unimplement `TreeHash` for `BeaconState`
This commit is contained in:
@@ -93,7 +93,6 @@ use std::io::Write;
|
||||
use std::sync::Arc;
|
||||
use store::{Error as DBError, HotStateSummary, KeyValueStore, StoreOp};
|
||||
use task_executor::JoinHandle;
|
||||
use tree_hash::TreeHash;
|
||||
use types::{
|
||||
BeaconBlockRef, BeaconState, BeaconStateError, ChainSpec, Epoch, EthSpec, ExecutionBlockHash,
|
||||
Hash256, InconsistentFork, PublicKey, PublicKeyBytes, RelativeEpoch, SignedBeaconBlock,
|
||||
@@ -2107,7 +2106,14 @@ pub fn verify_header_signature<T: BeaconChainTypes, Err: BlockBlobError>(
|
||||
|
||||
fn write_state<E: EthSpec>(prefix: &str, state: &BeaconState<E>, log: &Logger) {
|
||||
if WRITE_BLOCK_PROCESSING_SSZ {
|
||||
let root = state.tree_hash_root();
|
||||
let mut state = state.clone();
|
||||
let Ok(root) = state.canonical_root() else {
|
||||
error!(
|
||||
log,
|
||||
"Unable to hash state for writing";
|
||||
);
|
||||
return;
|
||||
};
|
||||
let filename = format!("{}_slot_{}_root_{}.ssz", prefix, state.slot(), root);
|
||||
let mut path = std::env::temp_dir().join("lighthouse");
|
||||
let _ = fs::create_dir_all(path.clone());
|
||||
|
||||
Reference in New Issue
Block a user