mirror of
https://github.com/tendermint/tendermint.git
synced 2026-07-20 06:52:30 +00:00
lite2: panic if witness is on another chain (#4356)
Closes #4350 Checks that the chain ID of the witness and that of the lite client are the same before updating the witness list.
This commit is contained in:
@@ -89,6 +89,11 @@ func SkippingVerification(trustLevel tmmath.Fraction) Option {
|
||||
// current primary is unavailable.
|
||||
func Witnesses(providers []provider.Provider) Option {
|
||||
return func(c *Client) {
|
||||
for _, witness := range providers {
|
||||
if witness.ChainID() != c.ChainID() {
|
||||
panic("Witness chainID is not equal to the Lite Client chainID")
|
||||
}
|
||||
}
|
||||
c.witnesses = providers
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user