neoneo-go/pkg
Ekaterina Pavlova 775c56e87e network: ensure server is started and shut down only once
Use started atomic.Bool field to ensure that the node server shutdown
procedure is executed only once. Prevent the following panic caused by
server double-shutdown in testing code:
```
--- FAIL: TestServerRegisterPeer (0
.06s)
 panic: closed twice
 goroutine 60 [running]:
 testing.tRunner.func1.2({0x104c40b20, 0x104d0ec90})
 	/opt/homebrew/opt/go/libexec/src/testing/testing.go:1545 +0x1c8
 testing.tRunner.func1()
 	/opt/homebrew/opt/go/libexec/src/testing/testing.go:1548 +0x360
 panic({0x104c40b20?, 0x104d0ec90?})
 	/opt/homebrew/opt/go/libexec/src/runtime/panic.go:914 +0x218
 github.com/nspcc-dev/neo-go/pkg/network.(*fakeTransp).Close
 (0x14000159e08?)
 	/Users/ekaterinapavlova/Workplace/neo-go/pkg/network
 	/discovery_test.go:83 +0x54
 github.com/nspcc-dev/neo-go/pkg/network.(*Server).Shutdown
 (0x14000343400)
 	/Users/ekaterinapavlova/Workplace/neo-go/pkg/network/server.go:299
 	 +0x104
 github.com/nspcc-dev/neo-go/pkg/network.startWithCleanup.func1()
 	/Users/ekaterinapavlova/Workplace/neo-go/pkg/network/server_test
 	.go:408 +0x20
 testing.(*common).Cleanup.func1()
 	/opt/homebrew/opt/go/libexec/src/testing/testing.go:1169 +0x110
 testing.(*common).runCleanup(0x1400032c340, 0x14000159d80?)
 	/opt/homebrew/opt/go/libexec/src/testing/testing.go:1347 +0xd8
 testing.tRunner.func2()
 	/opt/homebrew/opt/go/libexec/src/testing/testing.go:1589 +0x2c
 testing.tRunner(0x1400032c340, 0x104d0c5d0)
 	/opt/homebrew/opt/go/libexec/src/testing/testing.go:1601 +0x114
 created by testing.(*T).Run in goroutine 1
 	/opt/homebrew/opt/go/libexec/src/testing/testing.go:1648 +0x33c
```

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-02-27 15:10:51 +03:00
..
compiler compiler: add compatibility test for storage limits 2023-11-28 10:51:03 +03:00
config config: update validation with check committee 2024-01-22 10:25:23 +03:00
consensus services: move blockchain/mempool subscriptions to separate routine 2024-02-27 15:10:51 +03:00
core rpc: add new header_of_added_block event subscription 2023-12-22 15:14:01 +03:00
crypto *: introduce Genesis protocol configuration 2023-10-19 18:30:20 +03:00
encoding *: drop go 1.18 support in doc and build targets 2023-10-12 17:59:42 +03:00
interop interop: add contract storage limits 2023-11-27 19:56:13 +03:00
io *: replace interface{} with any keyword 2023-04-04 13:22:42 +03:00
neorpc neorpc: add WS notification filter IsValid functionality 2023-12-28 11:08:46 +03:00
neotest neotest: reuse wallet.Account for contract signers 2023-12-21 11:27:41 +03:00
network network: ensure server is started and shut down only once 2024-02-27 15:10:51 +03:00
rpcclient rpcclient: use better RPC endpoint for example 2024-02-26 23:18:45 +03:00
services services: move blockchain/mempool subscriptions to separate routine 2024-02-27 15:10:51 +03:00
smartcontract Merge pull request #3299 from nspcc-dev/autogeneration-linter 2024-01-26 12:50:35 +03:00
util *: replace interface{} with any keyword 2023-04-04 13:22:42 +03:00
vm vm: Add tests for iterator unwrap scripts 2023-12-29 10:50:43 +03:00
wallet wallet: make --wif optional in import-multisig command 2024-01-26 18:36:29 +03:00