-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge PR: fix ibc header validate (#2122)
* fix ibc hegith by other chain Co-authored-by: itsfunny <[email protected]>
- Loading branch information
1 parent
0ba4f32
commit b7e1868
Showing
9 changed files
with
202 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package types | ||
|
||
import ( | ||
tmbytes "github.com/okex/exchain/libs/tendermint/libs/bytes" | ||
) | ||
|
||
func (sh SignedHeader) ValidateBasicForIBC(chainID string) error { | ||
return sh.commonValidateBasic(chainID, true) | ||
} | ||
|
||
func (h *Header) PureIBCHash() tmbytes.HexBytes { | ||
if h == nil || len(h.ValidatorsHash) == 0 { | ||
return nil | ||
} | ||
return h.IBCHash() | ||
} | ||
|
||
func (commit *Commit) IBCVoteSignBytes(chainID string, valIdx int) []byte { | ||
return commit.GetVote(valIdx).ibcSignBytes(chainID) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.