mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 02:40:45 +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
|
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{
|
content, err := json.Marshal(&types.ForensicsContent{
|
||||||
DivergingBlockHash: ancestorHash.Hex(),
|
DivergingBlockHash: ancestorHash.Hex(),
|
||||||
AcrossEpoch: accrossEpoches,
|
AcrossEpoch: accrossEpoches,
|
||||||
|
DivergingBlockNumber: ancestorBlock.Number.Uint64(),
|
||||||
SmallerRoundInfo: &types.ForensicsInfo{
|
SmallerRoundInfo: &types.ForensicsInfo{
|
||||||
HashPath: ancestorToLowerRoundPath,
|
HashPath: ancestorToLowerRoundPath,
|
||||||
QuorumCert: lowerRoundQC,
|
QuorumCert: lowerRoundQC,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue