Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
marcello33 committed May 23, 2024
1 parent 4c4ff5e commit b96e8fd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions checkpoint/types/merkel_milestone.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ func ValidateMilestone(start uint64, end uint64, rootHash hmTypes.HeimdallHash,
if len(splitMilestoneID) != 2 {
return false, errors.New(fmt.Sprint("invalid milestoneID, it should be composed by `UUID - HexAddressOfTheProposer`", "milestoneID", milestoneID))
}

_, err = uuid.Parse(splitMilestoneID[0])
if err != nil {
return false, errors.New(fmt.Sprint("invalid milestoneID, the UUID is not correct", "milestoneID", milestoneID))
}

if !common.IsHexAddress(splitMilestoneID[1]) {
return false, errors.New(fmt.Sprint("invalid milestoneID, the proposer address is not correct", "milestoneID", milestoneID))
}
Expand Down

0 comments on commit b96e8fd

Please sign in to comment.