neoneo-go/pkg
Anna Shaleva 6357af0bb0 network: fix race in TestHandleGetMPTData
Init server config before server start. Fixes the following data race:

```
WARNING: DATA RACE
Write at 0x00c00032ef20 by goroutine 26:
  github.com/nspcc-dev/neo-go/pkg/network.TestHandleGetMPTData.func2()
      /go/src/github.com/nspcc-dev/neo-go/pkg/network/server_test.go:755 +0x10a
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:1193 +0x202

Previous read at 0x00c00032ef20 by goroutine 24:
  github.com/nspcc-dev/neo-go/internal/fakechain.(*FakeChain).GetConfig()
      /go/src/github.com/nspcc-dev/neo-go/internal/fakechain/fakechain.go:167 +0x6f
  github.com/nspcc-dev/neo-go/pkg/network.(*Server).initStaleMemPools()
      /go/src/github.com/nspcc-dev/neo-go/pkg/network/server.go:1433 +0x89
  github.com/nspcc-dev/neo-go/pkg/network.(*Server).Start()
      /go/src/github.com/nspcc-dev/neo-go/pkg/network/server.go:284 +0x288
  github.com/nspcc-dev/neo-go/pkg/network.startWithChannel.func1()
      /go/src/github.com/nspcc-dev/neo-go/pkg/network/server_test.go:91 +0x44

Goroutine 26 (running) created at:
  testing.(*T).Run()
      /usr/local/go/src/testing/testing.go:1238 +0x5d7
  github.com/nspcc-dev/neo-go/pkg/network.TestHandleGetMPTData()
      /go/src/github.com/nspcc-dev/neo-go/pkg/network/server_test.go:752 +0x8c
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:1193 +0x202

Goroutine 24 (running) created at:
  github.com/nspcc-dev/neo-go/pkg/network.startWithChannel()
      /go/src/github.com/nspcc-dev/neo-go/pkg/network/server_test.go:90 +0x78
  github.com/nspcc-dev/neo-go/pkg/network.startTestServer()
      /go/src/github.com/nspcc-dev/neo-go/pkg/network/server_test.go:384 +0xbd
  github.com/nspcc-dev/neo-go/pkg/network.TestHandleGetMPTData.func2()
      /go/src/github.com/nspcc-dev/neo-go/pkg/network/server_test.go:753 +0x55
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:1193 +0x202
```
2021-09-13 11:45:48 +03:00
..
compiler core: remove conflicting transactions wrt MaxTraceableBlocks 2021-08-18 13:31:47 +03:00
config config: add P2PStateExchangeExtensions and StateSyncInterval settings 2021-08-10 11:00:32 +03:00
consensus consensus: fix nonce handling 2021-07-21 19:06:19 +03:00
core Merge pull request #2166 from nspcc-dev/fix-nns-compat 2021-09-10 18:10:17 +03:00
crypto keys: reuse coordLen where appropriate 2021-08-26 17:30:04 +03:00
encoding util: move ArrayReverse into package of its own 2021-07-19 22:57:55 +03:00
interop interop: adjust documentation 2021-09-08 17:53:09 +03:00
io *: make tests use TempDir(), fix #1319 2021-08-26 17:29:40 +03:00
network network: fix race in TestHandleGetMPTData 2021-09-13 11:45:48 +03:00
rpc *: gofmt -s 2021-09-10 21:49:11 +03:00
services notary: fix possible deadlock in UpdateNotaryNodes 2021-07-23 14:48:00 +03:00
smartcontract core: avoid nil values during natives manifest marshalling 2021-09-10 11:38:59 +03:00
util util: reduce allocations in util.Uint256DecodeStringLE 2021-08-17 16:53:39 +03:00
vm vm: refactor stack dump commands 2021-09-09 13:45:10 +03:00
wallet *: make tests use TempDir(), fix #1319 2021-08-26 17:29:40 +03:00