Skip to content

Commit

Permalink
add comments for validate observer set
Browse files Browse the repository at this point in the history
  • Loading branch information
kingpinXD committed Aug 9, 2024
1 parent 691b95b commit 8f4068d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion x/observer/types/observer_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ func (m *ObserverSet) LenUint() uint64 {
return uint64(len(m.ObserverList))
}

// Validate observer mapper contains an existing chain
// Validate observer set verifies that the observer set is valid
// - All observer addresses are valid
// - No duplicate observer addresses
func (m *ObserverSet) Validate() error {
// Check for valid observer addresses
for _, observerAddress := range m.ObserverList {
_, err := sdk.AccAddressFromBech32(observerAddress)
if err != nil {
Expand Down

0 comments on commit 8f4068d

Please sign in to comment.