mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-07 13:55:17 +00:00
address discrepancies between spec and implementation (#322)
This commit is contained in:
@@ -457,6 +457,10 @@ we refer to a variable of the following type
|
|||||||
type LightClientAttackEvidence struct {
|
type LightClientAttackEvidence struct {
|
||||||
ConflictingBlock LightBlock
|
ConflictingBlock LightBlock
|
||||||
CommonHeight int64
|
CommonHeight int64
|
||||||
|
|
||||||
|
// Evidence also includes application specific data which is not
|
||||||
|
// part of verification but is sent to the application once the
|
||||||
|
// evidence gets committed on chain.
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -698,6 +702,10 @@ func CreateEvidenceForPeer(peer PeerID, root LightBlock, trace LightStore)
|
|||||||
// we can create evidence for submission to the secondary
|
// we can create evidence for submission to the secondary
|
||||||
ev := new InternalEvidence;
|
ev := new InternalEvidence;
|
||||||
ev.Evidence.ConflictingBlock := trace[i];
|
ev.Evidence.ConflictingBlock := trace[i];
|
||||||
|
// CommonHeight is used to indicate the type of attack
|
||||||
|
// if the CommonHeight != ConflictingBlock.Height this
|
||||||
|
// is by definition a lunatic attack else it is an
|
||||||
|
// equivocation attack
|
||||||
ev.Evidence.CommonHeight := common.Height;
|
ev.Evidence.CommonHeight := common.Height;
|
||||||
ev.Peer := peer
|
ev.Peer := peer
|
||||||
return (ev, common, auxLS, FoundEvidence)
|
return (ev, common, auxLS, FoundEvidence)
|
||||||
|
|||||||
@@ -472,8 +472,6 @@ type LightBlock struct {
|
|||||||
Header Header
|
Header Header
|
||||||
Commit Commit
|
Commit Commit
|
||||||
Validators ValidatorSet
|
Validators ValidatorSet
|
||||||
NextValidators ValidatorSet
|
|
||||||
Provider PeerID
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -486,8 +486,6 @@ type LightBlock struct {
|
|||||||
Header Header
|
Header Header
|
||||||
Commit Commit
|
Commit Commit
|
||||||
Validators ValidatorSet
|
Validators ValidatorSet
|
||||||
NextValidators ValidatorSet
|
|
||||||
Provider PeerID
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user