Commit graph

4461 commits

Author SHA1 Message Date
Anna Shaleva
99b37efc31 core: remove native NNS 2021-05-17 22:22:07 +03:00
Anna Shaleva
4c4361b2c6 native: move\remove native NNS tests
Record types test is moved to non-native NNS tests and adjusted
according to the non-native implementation behavior.

NEP11-compliance test is removed (non-native NNS is checked against
NEP11 standard during examples compilation test).

Domain name test is removed (we already have the same non-native
NNS tests).
2021-05-17 22:22:03 +03:00
Anna Shaleva
bfda758221 core: replace native NNS with non-native NNS in core tests 2021-05-17 22:12:38 +03:00
Anna Shaleva
71948d903b cli: use non-native NNS instead of native NNS in NEP-related tests 2021-05-17 22:09:30 +03:00
Anna Shaleva
7180b2ce06 rpc: use non-native NNS instead of native NNS in testchain 2021-05-17 22:08:15 +03:00
Anna Shaleva
4f1c50373f core: detalize errors during contract.LoadToken and contract.Call 2021-05-17 22:08:15 +03:00
Anna Shaleva
6eee868b4a interop: remove native NNS API wrappers 2021-05-17 22:08:15 +03:00
Anna Shaleva
7f43c48182 examples: add non-native NeoNameService contract 2021-05-17 22:08:10 +03:00
Roman Khimov
2cb878cb7a
Merge pull request #1961 from nspcc-dev/bench-fixes
wallet: rename `isdefault` to `isDefault`
2021-05-14 17:09:56 +03:00
Evgeniy Stratonikov
ea49c6b637 wallet: rename isdefault to isDefault
Follow neo-project/neo#2451 .
2021-05-14 10:31:31 +03:00
Roman Khimov
fcf29bc093
Merge pull request #1959 from nspcc-dev/drop-vendoring
Drop vendoring, fix jsonpath lint
2021-05-13 17:54:39 +03:00
Roman Khimov
4131e208e5 jsonpath: drop unnecessary assignment, fix lint fail
pkg/services/oracle/jsonpath/jsonpath.go:354:8  ineffassign  ineffectual assignment to val
2021-05-13 17:26:38 +03:00
Roman Khimov
186cfa32df go.sum: go mod tidy 2021-05-13 17:22:30 +03:00
Roman Khimov
db4bd28160 Makefile: drop vendoring
It's not really needed.
2021-05-13 17:22:10 +03:00
Roman Khimov
d6364739c5 Dockerfile: use make to build neo-go
Don't duplicate go build invocation line there.
2021-05-13 17:16:27 +03:00
Roman Khimov
f2f9ec1a05
Merge pull request #1916 from nspcc-dev/fix/oraclefilter
oracle: make JSONPath compatible with C# implementation
2021-05-13 15:34:52 +03:00
Evgeniy Stratonikov
28a0d68c05 jsonpath: allow empty paths 2021-05-13 11:53:49 +03:00
Evgeniy Stratonikov
5fc81c787b jsonpath: use ordered map json unmarshaler 2021-05-13 11:53:49 +03:00
Evgeniy Stratonikov
6890688b8f oracle: add max nesting depth to JSONPath filter 2021-05-13 11:53:49 +03:00
Evgeniy Stratonikov
1c30d8c395 oracle: make JSONPath compatible with C# implementation
C# node uses simplified implementation which is easy to port.
2021-05-13 11:53:28 +03:00
Roman Khimov
834743ec88
Merge pull request #1958 from nspcc-dev/linter
Linter improvements
2021-05-13 10:52:58 +03:00
Roman Khimov
50cb0450f2 circleci/workflows: drop vet run
golangci-lint already includes govet, so having it in a separate task doesn't
add any value (only increases CI running time).
2021-05-13 00:08:42 +03:00
Roman Khimov
c76f8b8fbe Makefile: use golangci-lint instead of golint
It includes golint and also has a lot of other useful linters.
2021-05-12 23:38:35 +03:00
Roman Khimov
9d2712573f *: enable godot linter and fix all its warnings
It's important for NeoGo to have clean documentation. No functional changes.
2021-05-12 23:17:03 +03:00
Roman Khimov
3fdba9265f add golangci-lint configuration
It's mostly based on neofs-http-gate configuration, but has exhaustive
disabled and some golint-specific warnings enabled (some of which are
important for us).
2021-05-12 22:53:28 +03:00
Roman Khimov
d4a2f4d8b9 hash: suppress staticcheck warning 2021-05-12 22:52:32 +03:00
Roman Khimov
4e651eaf83 compiler: simplify increments as suggested by golint 2021-05-12 22:52:07 +03:00
Roman Khimov
c4e084b0d8 *: fix whitespace errors
leading/trailing newlines
2021-05-12 22:51:41 +03:00
Roman Khimov
6fea16451a cli/input: ignore term.Restore errors, fix errcheck warnings
I'm not sure we can do anything useful here.
2021-05-12 21:53:41 +03:00
Roman Khimov
b1710bebaa native: fix errcheck errors in nns contract 2021-05-12 21:49:42 +03:00
Roman Khimov
a44376903a rpc: fix errcheck warnings in websocket code 2021-05-12 21:48:38 +03:00
Roman Khimov
e9cefc4bfc *: fix all errcheck warnings in testing code 2021-05-12 21:45:12 +03:00
Roman Khimov
0500c8f9d7 cli/wallet: fix error handling
cli/wallet/wallet.go:527:19: Error return value of `cli.NewExitError` is not checked (errcheck)
                cli.NewExitError("valid account address must be provided", 1)
2021-05-12 20:19:24 +03:00
Roman Khimov
f1f30fd0c5 gendump: fix errcheck warning
scripts/gendump/main.go:95:13: Error return value of `rand.Read` is not checked (errcheck)
                        rand.Read(key)
                                 ^
scripts/gendump/main.go:96:13: Error return value of `rand.Read` is not checked (errcheck)
                        rand.Read(value)
                                 ^
2021-05-12 20:18:11 +03:00
Roman Khimov
4caff35e73 consensus: fix error checking in decoders
Spotted by errcheck.
2021-05-12 20:14:52 +03:00
Roman Khimov
99108c620f network: fix errcheck warning 2021-05-12 20:14:35 +03:00
Roman Khimov
601841ef35 *: drop unused structure fields
Found by structcheck:
 `good` is unused (structcheck)
and alike.
2021-05-12 19:41:23 +03:00
Roman Khimov
4cd3da99b4 core: fix ineffassign warning in test code
ineffectual assignment to err (ineffassign)
2021-05-12 19:37:14 +03:00
Roman Khimov
ec50bb4041 cli/wallet: fix error handling
ineffectual assignment to err (ineffassign)

`err` is shadowed at `tx, err = c.CreateNEP11TransferTx()` line.
2021-05-12 19:34:12 +03:00
Roman Khimov
78bf172108 network: drop some not really useful test code
SA4010: this result of append is never used, except maybe in other appends (staticcheck)
2021-05-12 19:29:45 +03:00
Roman Khimov
b5ff87c2bd native: fix minimum deployment fee setting
SA4003: no value of type uint32 is less than 0 (staticcheck)

But it's more involved than that, we should allow any positive big.Int here.
2021-05-12 19:27:02 +03:00
Roman Khimov
d15cacc1ba rpc/client: fix broken test code
SA1024: cutset contains duplicate characters (staticcheck)
2021-05-12 19:15:21 +03:00
Roman Khimov
b8ba923874 standard: improve testing code
staticcheck: SA4021: x = append(y) is equivalent to x = y
2021-05-12 19:12:09 +03:00
Roman Khimov
333f778aa6 *: drop empty branches
Fix this warning from staticcheck: SA9003: empty branch
2021-05-12 19:10:31 +03:00
Roman Khimov
92dbb3c4b9 *: fix all unused warnings
From golangci-lint.
2021-05-12 18:53:12 +03:00
Roman Khimov
de5e61588d vm: simplify some test code
gosimple: S1017: should replace this `if` statement with an unconditional `strings.TrimPrefix`
2021-05-12 18:44:35 +03:00
Roman Khimov
7af67d2a3c vm/cli: simplify buffer-related code
gosimple: S1030: should use buf.String() instead of string(buf.Bytes())
2021-05-12 18:42:50 +03:00
Roman Khimov
bd48454c72 mempool: simpilfy boolean comparisons in test code
gosimple: S1008: should use 'return t == tx2' instead of 'if t == tx2 { return true }; return false'
2021-05-12 18:40:41 +03:00
Roman Khimov
cf59bd878d native: simplify escaping in regexp.MustCompile()
gosimple: S1007: should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice
2021-05-12 18:38:24 +03:00
Roman Khimov
0178594850 *: simpilfy make() invocations
gosimple: S1019: should use make([]byte, 64) instead
2021-05-12 18:36:45 +03:00