aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2017-01-06 22:52:03 +0800
committerFelix Lange <fjl@twurst.com>2017-01-06 22:52:03 +0800
commit35a7dcb162546f7f31cb6492f716cb93159218d7 (patch)
tree4828026948031719a703a87e0ce909e82da21d3b /common
parente0fde022909d272e55fb9ea2d4f8cfe9f178dba8 (diff)
downloadgo-tangerine-35a7dcb162546f7f31cb6492f716cb93159218d7.tar
go-tangerine-35a7dcb162546f7f31cb6492f716cb93159218d7.tar.gz
go-tangerine-35a7dcb162546f7f31cb6492f716cb93159218d7.tar.bz2
go-tangerine-35a7dcb162546f7f31cb6492f716cb93159218d7.tar.lz
go-tangerine-35a7dcb162546f7f31cb6492f716cb93159218d7.tar.xz
go-tangerine-35a7dcb162546f7f31cb6492f716cb93159218d7.tar.zst
go-tangerine-35a7dcb162546f7f31cb6492f716cb93159218d7.zip
all: gofmt -w -s
Diffstat (limited to 'common')
-rw-r--r--common/bytes.go2
-rw-r--r--common/math/dist_test.go36
2 files changed, 19 insertions, 19 deletions
diff --git a/common/bytes.go b/common/bytes.go
index b9fb3b2da..cbceea8b5 100644
--- a/common/bytes.go
+++ b/common/bytes.go
@@ -143,7 +143,7 @@ func Hex2BytesFixed(str string, flen int) []byte {
return h
} else {
if len(h) > flen {
- return h[len(h)-flen : len(h)]
+ return h[len(h)-flen:]
} else {
hh := make([]byte, flen)
copy(hh[flen-len(h):flen], h[:])
diff --git a/common/math/dist_test.go b/common/math/dist_test.go
index 826faea8b..f5857b6f8 100644
--- a/common/math/dist_test.go
+++ b/common/math/dist_test.go
@@ -41,24 +41,24 @@ func TestSum(t *testing.T) {
func TestDist(t *testing.T) {
var vectors = []Vector{
- Vector{big.NewInt(1000), big.NewInt(1234)},
- Vector{big.NewInt(500), big.NewInt(10023)},
- Vector{big.NewInt(1034), big.NewInt(1987)},
- Vector{big.NewInt(1034), big.NewInt(1987)},
- Vector{big.NewInt(8983), big.NewInt(1977)},
- Vector{big.NewInt(98382), big.NewInt(1887)},
- Vector{big.NewInt(12398), big.NewInt(1287)},
- Vector{big.NewInt(12398), big.NewInt(1487)},
- Vector{big.NewInt(12398), big.NewInt(1987)},
- Vector{big.NewInt(12398), big.NewInt(128)},
- Vector{big.NewInt(12398), big.NewInt(1987)},
- Vector{big.NewInt(1398), big.NewInt(187)},
- Vector{big.NewInt(12328), big.NewInt(1927)},
- Vector{big.NewInt(12398), big.NewInt(1987)},
- Vector{big.NewInt(22398), big.NewInt(1287)},
- Vector{big.NewInt(1370), big.NewInt(1981)},
- Vector{big.NewInt(12398), big.NewInt(1957)},
- Vector{big.NewInt(42198), big.NewInt(1987)},
+ {big.NewInt(1000), big.NewInt(1234)},
+ {big.NewInt(500), big.NewInt(10023)},
+ {big.NewInt(1034), big.NewInt(1987)},
+ {big.NewInt(1034), big.NewInt(1987)},
+ {big.NewInt(8983), big.NewInt(1977)},
+ {big.NewInt(98382), big.NewInt(1887)},
+ {big.NewInt(12398), big.NewInt(1287)},
+ {big.NewInt(12398), big.NewInt(1487)},
+ {big.NewInt(12398), big.NewInt(1987)},
+ {big.NewInt(12398), big.NewInt(128)},
+ {big.NewInt(12398), big.NewInt(1987)},
+ {big.NewInt(1398), big.NewInt(187)},
+ {big.NewInt(12328), big.NewInt(1927)},
+ {big.NewInt(12398), big.NewInt(1987)},
+ {big.NewInt(22398), big.NewInt(1287)},
+ {big.NewInt(1370), big.NewInt(1981)},
+ {big.NewInt(12398), big.NewInt(1957)},
+ {big.NewInt(42198), big.NewInt(1987)},
}
VectorsBy(GasSort).Sort(vectors)