mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-12 21:01:21 +00:00
Added README docs for account/binary and renamed UInt -> Uint etc.
This commit is contained in:
@ -6,15 +6,15 @@ import (
|
||||
|
||||
// Sort for []uint64
|
||||
|
||||
type UInt64Slice []uint64
|
||||
type Uint64Slice []uint64
|
||||
|
||||
func (p UInt64Slice) Len() int { return len(p) }
|
||||
func (p UInt64Slice) Less(i, j int) bool { return p[i] < p[j] }
|
||||
func (p UInt64Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] }
|
||||
func (p UInt64Slice) Sort() { sort.Sort(p) }
|
||||
func (p Uint64Slice) Len() int { return len(p) }
|
||||
func (p Uint64Slice) Less(i, j int) bool { return p[i] < p[j] }
|
||||
func (p Uint64Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] }
|
||||
func (p Uint64Slice) Sort() { sort.Sort(p) }
|
||||
|
||||
func SearchUInt64s(a []uint64, x uint64) int {
|
||||
func SearchUint64s(a []uint64, x uint64) int {
|
||||
return sort.Search(len(a), func(i int) bool { return a[i] >= x })
|
||||
}
|
||||
|
||||
func (p UInt64Slice) Search(x uint64) int { return SearchUInt64s(p, x) }
|
||||
func (p Uint64Slice) Search(x uint64) int { return SearchUint64s(p, x) }
|
||||
|
Reference in New Issue
Block a user