neo-go/pkg
Roman Khimov 5979138306 stateroot: fix panic on shutdown
Stateroot service is always active, but it might have no wallet.

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0xc57d41]

goroutine 1 [running]:
github.com/nspcc-dev/neo-go/pkg/wallet.(*Wallet).Close(...)
        github.com/nspcc-dev/neo-go/pkg/wallet/wallet.go:175
github.com/nspcc-dev/neo-go/pkg/services/stateroot.(*service).Shutdown(0xc000105880?)
        github.com/nspcc-dev/neo-go/pkg/services/stateroot/validators.go:77 +0x81
github.com/nspcc-dev/neo-go/pkg/network.(*Server).Shutdown(0xc000105880)
        github.com/nspcc-dev/neo-go/pkg/network/server.go:271 +0x205
github.com/nspcc-dev/neo-go/cli/server.startServer(0xc0002702c0)
        github.com/nspcc-dev/neo-go/cli/server/server.go:641 +0x2675
github.com/urfave/cli.HandleAction({0xe456e0?, 0x1155f20?}, 0x4?)
        github.com/urfave/cli@v1.22.5/app.go:524 +0x50
github.com/urfave/cli.Command.Run({{0xfca38b, 0x4}, {0x0, 0x0}, {0x0, 0x0, 0x0}, {0xfd6a46, 0x10}, {0xffebe3, ...}, ...}, ...)
        github.com/urfave/cli@v1.22.5/command.go:173 +0x65b
github.com/urfave/cli.(*App).Run(0xc000272000, {0xc00003e180, 0x3, 0x3})
        github.com/urfave/cli@v1.22.5/app.go:277 +0x8a7
main.main()
        ./main.go:21 +0x33
2022-09-13 13:18:13 +03:00
..
compiler compiler: add test for #2661 2022-09-01 13:39:22 +03:00
config cli: also check new ApplicationConfiguration for consistency 2022-07-27 12:30:08 +03:00
consensus *: always close the wallet after use 2022-09-02 14:44:32 +03:00
core golangci: add predeclared linter 2022-09-02 18:36:26 +03:00
crypto keys: check length first, then do things in WIFDecode 2022-09-02 14:44:32 +03:00
encoding fixedn: add a test for empty string 2022-08-19 21:52:43 +03:00
interop *: apply go 1.19 formatter heuristics 2022-08-09 15:37:52 +03:00
io [#2442] English Check 2022-05-04 19:48:27 +03:00
neorpc golangci: add predeclared linter 2022-09-02 18:36:26 +03:00
neotest wallet: provide (*Account).SignHashable API 2022-09-02 14:44:01 +03:00
network golangci: enable errorlint and fix everything it found 2022-09-02 18:36:23 +03:00
rpcclient rpcclient: simplify historic API 2022-09-09 13:41:45 +03:00
services stateroot: fix panic on shutdown 2022-09-13 13:18:13 +03:00
smartcontract context: define a constant for transaction context type 2022-09-08 14:33:04 +03:00
util slice: add Clean microfunction 2022-09-02 14:44:32 +03:00
vm vm/cli: generate Go 1.17 go.mods 2022-09-08 21:18:51 +03:00
wallet wallet: add some warnings to Decrypt and PrivateKey docs 2022-09-02 14:44:18 +03:00