mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-22 22:54:33 +00:00
add DivergingBlockNumber in forensics report (#105)
This commit is contained in:
parent
3ebaea1945
commit
86ec908091
1 changed files with 10 additions and 2 deletions
|
|
@ -157,9 +157,17 @@ func (f *Forensics) SendForensicProof(chain consensus.ChainReader, engine *XDPoS
|
|||
accrossEpoches = true
|
||||
}
|
||||
|
||||
ancestorBlock := chain.GetHeaderByHash(ancestorHash)
|
||||
|
||||
if ancestorBlock == nil {
|
||||
log.Error("[SendForensicProof] Unable to find the ancestor block by its hash", "Hash", ancestorHash)
|
||||
return fmt.Errorf("Can't find ancestor block via hash")
|
||||
}
|
||||
|
||||
content, err := json.Marshal(&types.ForensicsContent{
|
||||
DivergingBlockHash: ancestorHash.Hex(),
|
||||
AcrossEpoch: accrossEpoches,
|
||||
DivergingBlockHash: ancestorHash.Hex(),
|
||||
AcrossEpoch: accrossEpoches,
|
||||
DivergingBlockNumber: ancestorBlock.Number.Uint64(),
|
||||
SmallerRoundInfo: &types.ForensicsInfo{
|
||||
HashPath: ancestorToLowerRoundPath,
|
||||
QuorumCert: lowerRoundQC,
|
||||
|
|
|
|||
Loading…
Reference in a new issue