Skip to content

Commit 49c5144

Browse files
author
LazyLuis
committed
add empty block check
1 parent dfc5901 commit 49c5144

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

x/oracle/abci/extension.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ func (h *PriceOracleVoteExtHandler) ProcessProposal() sdk.ProcessProposalHandler
214214
h.logger.Error("failed to decode vote extension", "err", err, "validator", fmt.Sprintf("%x", vote.Validator.Address))
215215
return nil, err
216216
}
217-
if voteExt.Proposer != hex.EncodeToString(vote.Validator.Address) && len(voteExt.Prices) == 0 {
217+
if voteExt.Proposer != hex.EncodeToString(vote.Validator.Address) && (len(voteExt.Prices) == 0 || voteExt.Blocks.Best == 0) {
218218
return &abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_REJECT}, nil
219219
}
220220
}

0 commit comments

Comments
 (0)