diff --git a/state/execution.go b/state/execution.go index de68518c7..e7ab02e38 100644 --- a/state/execution.go +++ b/state/execution.go @@ -146,7 +146,11 @@ func (blockExec *BlockExecutor) CreateProposalBlock( // Validation does not mutate state, but does require historical information from the stateDB, // ie. to verify evidence from a validator at an old height. func (blockExec *BlockExecutor) ValidateBlock(state State, round int32, block *types.Block) error { - return validateBlock(state, round, block) + err := validateBlock(state, round, block) + if err != nil { + return err + } + return blockExec.evpool.CheckEvidence(block.Evidence.Evidence) } // ApplyBlock validates the block against the state, executes it against the app, diff --git a/types/protobuf.go b/types/protobuf.go index 978d4472b..c75e68314 100644 --- a/types/protobuf.go +++ b/types/protobuf.go @@ -50,7 +50,7 @@ func (oc2pb) Header(header *Header) tmproto.Header { LastCommitHash: header.LastCommitHash, DataHash: header.DataHash, - VotersHash: header.VotersHash, + ValidatorsHash: header.ValidatorsHash, NextValidatorsHash: header.NextValidatorsHash, ConsensusHash: header.ConsensusHash, AppHash: header.AppHash, @@ -58,6 +58,11 @@ func (oc2pb) Header(header *Header) tmproto.Header { EvidenceHash: header.EvidenceHash, ProposerAddress: header.ProposerAddress, + + // Ostracon fields + Round: header.Round, + Proof: header.Proof, + VotersHash: header.VotersHash, } } diff --git a/types/validator.go b/types/validator.go index 468d20558..7ca4841c0 100644 --- a/types/validator.go +++ b/types/validator.go @@ -99,10 +99,11 @@ func (v *Validator) String() string { if v == nil { return "nil-Validator" } - return fmt.Sprintf("Validator{%v %v VP:%v A:%v}", + return fmt.Sprintf("Validator{%v %v VP:%v VW:%v A:%v}", v.Address, v.PubKey, v.VotingPower, + v.VotingWeight, v.ProposerPriority) }