Add extra data in /eth/v1/debug/fork_choice (#7845)

* #7829


  


Co-Authored-By: Tan Chee Keong <tanck@sigmaprime.io>

Co-Authored-By: chonghe <44791194+chong-he@users.noreply.github.com>
This commit is contained in:
chonghe
2025-11-12 15:01:52 +08:00
committed by GitHub
parent d54dc685a3
commit b5260db5e6
3 changed files with 70 additions and 3 deletions

View File

@@ -1520,6 +1520,21 @@ pub struct ForkChoiceNode {
pub weight: u64,
pub validity: Option<String>,
pub execution_block_hash: Option<Hash256>,
pub extra_data: ForkChoiceExtraData,
}
#[derive(Debug, Serialize, Deserialize, PartialEq, Eq)]
pub struct ForkChoiceExtraData {
pub target_root: Hash256,
pub justified_root: Hash256,
pub finalized_root: Hash256,
pub unrealized_justified_root: Option<Hash256>,
pub unrealized_finalized_root: Option<Hash256>,
pub unrealized_justified_epoch: Option<Epoch>,
pub unrealized_finalized_epoch: Option<Epoch>,
pub execution_status: String,
pub best_child: Option<Hash256>,
pub best_descendant: Option<Hash256>,
}
#[derive(Copy, Clone, Debug, Default, Serialize, Deserialize, PartialEq, Eq)]