neo-go/pkg
Roman Khimov 31948ee4a7 network: add a nil check in (*TCPTransport).Close, prevent panic
You have to try to trigger that, but in the event of server shutdown before it
actually started listening Close will easily panic like this:

2020-03-05T11:48:08.660+0300    INFO    node started    {"blockHeight": 6458, "headerHeight": 15605}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x9d5f0a]

goroutine 1 [running]:
github.com/nspcc-dev/neo-go/pkg/network.(*TCPTransport).Close(0xc000fd7050)
        /home/rik/dev/neo-go/pkg/network/tcp_transport.go:78 +0x2a
github.com/nspcc-dev/neo-go/pkg/network.(*Server).Shutdown(0xc000182280)
        /home/rik/dev/neo-go/pkg/network/server.go:190 +0x189
github.com/nspcc-dev/neo-go/cli/server.startServer(0xc000200160, 0x0, 0x0)
        /home/rik/dev/neo-go/cli/server/server.go:367 +0x79e
github.com/urfave/cli.HandleAction(0xb84860, 0xccf240, 0xc000200160, 0xc0001c4500, 0x0)
        /home/rik/dev/neo-go/vendor/github.com/urfave/cli/app.go:490 +0xc8
github.com/urfave/cli.Command.Run(0xc9a160, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0xca407f, 0x10, 0x0, ...)
        /home/rik/dev/neo-go/vendor/github.com/urfave/cli/command.go:210 +0x996
github.com/urfave/cli.(*App).Run(0xc0001d64e0, 0xc0000ca000, 0x3, 0x3, 0x0, 0x0)
        /home/rik/dev/neo-go/vendor/github.com/urfave/cli/app.go:255 +0x6af
main.main()
        /home/rik/dev/neo-go/cli/main.go:25 +0x505
2020-03-05 11:53:26 +03:00
..
compiler *: move all packages from CityOfZion to nspcc-dev 2020-03-03 17:21:42 +03:00
consensus pkg: fix gofmt issues 2020-03-03 17:22:15 +03:00
core Merge pull request #718 from nspcc-dev/fix-invocation-tx-checks-and-fee 2020-03-05 11:51:51 +03:00
crypto *: move all packages from CityOfZion to nspcc-dev 2020-03-03 17:21:42 +03:00
encoding *: move all packages from CityOfZion to nspcc-dev 2020-03-03 17:21:42 +03:00
internal *: move all packages from CityOfZion to nspcc-dev 2020-03-03 17:21:42 +03:00
interop *: move all packages from CityOfZion to nspcc-dev 2020-03-03 17:21:42 +03:00
io *: move all packages from CityOfZion to nspcc-dev 2020-03-03 17:21:42 +03:00
network network: add a nil check in (*TCPTransport).Close, prevent panic 2020-03-05 11:53:26 +03:00
rpc core: fix SystemFee calculation for Invocation TXes 2020-03-04 19:23:23 +03:00
smartcontract smartcontract: allow to marshal nil parameters 2020-03-04 19:55:04 +03:00
util util: rename Int64Value to IntegralValue, add FractionalValue 2020-03-04 19:23:23 +03:00
vm *: move all packages from CityOfZion to nspcc-dev 2020-03-03 17:21:42 +03:00
wallet *: move all packages from CityOfZion to nspcc-dev 2020-03-03 17:21:42 +03:00