neo-go/pkg/services/stateroot
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
..
message.go [#2442] English Check 2022-05-04 19:48:27 +03:00
network.go wallet: provide (*Account).SignHashable API 2022-09-02 14:44:01 +03:00
service.go core: accept two-side channels for sub/unsub, read on unsub 2022-08-19 22:08:40 +03:00
service_test.go *: don't get private key from account if just public one is needed 2022-09-02 14:43:28 +03:00
signature.go [#2442] English Check 2022-05-04 19:48:27 +03:00
validators.go stateroot: fix panic on shutdown 2022-09-13 13:18:13 +03:00
vote.go [#2442] English Check 2022-05-04 19:48:27 +03:00