neoneo-go/pkg
Roman Khimov 760b39e324 consensus: close chain in tests
Avoid test failures like this one:

=== RUN   TestService_OnPayload
==================
WARNING: DATA RACE
Read at 0x00c00015a843 by goroutine 112:
  testing.(*common).logDepth()
      /usr/local/go/src/testing/testing.go:665 +0xa1
  testing.(*common).Logf()
      /usr/local/go/src/testing/testing.go:658 +0x8f
  testing.(*T).Logf()
      <autogenerated>:1 +0x75
  go.uber.org/zap/zaptest.testingWriter.Write()
      /go/pkg/mod/go.uber.org/zap@v1.10.0/zaptest/logger.go:130 +0x11f
  go.uber.org/zap/zaptest.(*testingWriter).Write()
      <autogenerated>:1 +0xa9
  go.uber.org/zap/zapcore.(*ioCore).Write()
      /go/pkg/mod/go.uber.org/zap@v1.10.0/zapcore/core.go:90 +0x1c3
  go.uber.org/zap/zapcore.(*CheckedEntry).Write()
      /go/pkg/mod/go.uber.org/zap@v1.10.0/zapcore/entry.go:215 +0x1e7
  go.uber.org/zap.(*Logger).Info()
      /go/pkg/mod/go.uber.org/zap@v1.10.0/logger.go:187 +0x95
  github.com/CityOfZion/neo-go/pkg/core.(*Blockchain).persist()
      /go/src/github.com/CityOfZion/neo-go/pkg/core/blockchain.go:720 +0x6bb
  github.com/CityOfZion/neo-go/pkg/core.(*Blockchain).Run.func2()
      /go/src/github.com/CityOfZion/neo-go/pkg/core/blockchain.go:228 +0x53

Previous write at 0x00c00015a843 by goroutine 98:
  testing.tRunner.func1()
      /usr/local/go/src/testing/testing.go:900 +0x353
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:913 +0x1bb

Goroutine 112 (running) created at:
  github.com/CityOfZion/neo-go/pkg/core.(*Blockchain).Run()
      /go/src/github.com/CityOfZion/neo-go/pkg/core/blockchain.go:227 +0x264

Goroutine 98 (finished) created at:
  testing.(*T).Run()
      /usr/local/go/src/testing/testing.go:960 +0x651
  testing.runTests.func1()
      /usr/local/go/src/testing/testing.go:1202 +0xa6
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:909 +0x199
  testing.runTests()
      /usr/local/go/src/testing/testing.go:1200 +0x521
  testing.(*M).Run()
      /usr/local/go/src/testing/testing.go:1117 +0x2ff
  main.main()
      _testmain.go:162 +0x337
==================
--- FAIL: TestService_OnPayload (4.11s)
2020-01-20 19:40:52 +03:00
..
compiler Merge pull request #568 from nspcc-dev/feature/compiler_clean_and_tests 2020-01-14 18:44:07 +03:00
consensus consensus: close chain in tests 2020-01-20 19:40:52 +03:00
core Merge pull request #601 from nspcc-dev/refactoring/core 2020-01-20 16:19:20 +03:00
crypto keys: don't return error from PrivateKey.Sign 2020-01-17 17:00:30 +03:00
encoding address: rename functions as per #579 comments 2019-12-25 17:34:18 +03:00
internal internal: moved testutil method to internal package 2019-12-11 13:14:43 +03:00
interop fix spelling and godoc comments 2019-10-22 17:56:03 +03:00
io io: remove ReadLE/BE and WriteLE/BE 2019-12-13 11:38:28 +03:00
network network: introduce peer sending queues 2020-01-20 17:23:26 +03:00
rpc Merge pull request #601 from nspcc-dev/refactoring/core 2020-01-20 16:19:20 +03:00
smartcontract network: allow single-node privnet setup 2020-01-13 18:01:20 +03:00
util io: add type-specific read/write methods 2019-12-12 20:19:50 +03:00
vm vm: use new big.Int (de-)serialization routines 2020-01-17 17:37:50 +03:00
wallet wallet: add GetAccount() method to Wallet 2020-01-17 17:25:51 +03:00