cleanup and bugfix (#737)

This commit is contained in:
Bryan White 2018-11-30 14:04:59 +01:00 committed by GitHub
parent 9ac3517432
commit 66b3a20595
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 16 deletions

View File

@ -25,7 +25,7 @@ type validationErrors []error
// Add new ErrValidation err
func (validation *validationErrors) Add(format string, args ...interface{}) {
*validation = append(*validation, ErrValidation.New(format, args))
*validation = append(*validation, ErrValidation.New(format, args...))
}
// AddWrap adds new ErrValidation wrapped err

View File

@ -71,21 +71,6 @@ func (id NodeID) String() string {
return base58.CheckEncode(id[:], IDVersion)
}
// Len implements sort.Interface.Len()
func (id NodeID) Len() int {
return len(id)
}
// Swap implements sort.Interface.Swap()
func (id NodeID) Swap(i, j int) {
id[i], id[j] = id[j], id[i]
}
// Less implements sort.Interface.Less()
func (id NodeID) Less(i, j int) bool {
return id[i] < id[j]
}
// Bytes returns raw bytes of the id
func (id NodeID) Bytes() []byte { return id[:] }