neoneo-go/pkg
Roman Khimov 15b621f0f3 consensus: wait goroutine to finish on Shutdown
Fixes:
panic: assignment to entry in nil map

goroutine 227 [running]:
github.com/nspcc-dev/neo-go/pkg/core/storage.(*MemoryStore).put(...)
        /home/rik/dev/neo-go/pkg/core/storage/memory_store.go:53
github.com/nspcc-dev/neo-go/pkg/core/storage.(*MemoryStore).PutBatch(0xc00035f580, 0x110a680, 0xc000336750, 0x0, 0x0)
        /home/rik/dev/neo-go/pkg/core/storage/memory_store.go:93 +0x286
github.com/nspcc-dev/neo-go/pkg/core.(*Blockchain).addHeaders(0xc0000a2340, 0xc0001be301, 0xc00036d428, 0x1, 0x1, 0x0, 0x0)
        /home/rik/dev/neo-go/pkg/core/blockchain.go:516 +0xd5a
github.com/nspcc-dev/neo-go/pkg/core.(*Blockchain).AddBlock(0xc0000a2340, 0xc0000bc2c0, 0x0, 0x0)
        /home/rik/dev/neo-go/pkg/core/blockchain.go:407 +0x9ca
github.com/nspcc-dev/neo-go/pkg/consensus.(*service).processBlock(0xc000152160, 0x1122320, 0xc0000bc2c0)
        /home/rik/dev/neo-go/pkg/consensus/consensus.go:440 +0xbf
github.com/nspcc-dev/dbft.(*DBFT).checkCommit(0xc0000d3400)
        /home/rik/go/pkg/mod/github.com/nspcc-dev/dbft@v0.0.0-20200911152629-be965ee4d449/check.go:71 +0x918
github.com/nspcc-dev/dbft.(*DBFT).checkPrepare(0xc0000d3400)
        /home/rik/go/pkg/mod/github.com/nspcc-dev/dbft@v0.0.0-20200911152629-be965ee4d449/check.go:36 +0x465
github.com/nspcc-dev/dbft.(*DBFT).sendPrepareRequest(0xc0000d3400)
        /home/rik/go/pkg/mod/github.com/nspcc-dev/dbft@v0.0.0-20200911152629-be965ee4d449/send.go:42 +0x2f8
github.com/nspcc-dev/dbft.(*DBFT).start(0xc0000d3400)
        /home/rik/go/pkg/mod/github.com/nspcc-dev/dbft@v0.0.0-20200911152629-be965ee4d449/dbft.go:269 +0x26f
github.com/nspcc-dev/dbft.(*DBFT).Start(0xc0000d3400)
        /home/rik/go/pkg/mod/github.com/nspcc-dev/dbft@v0.0.0-20200911152629-be965ee4d449/dbft.go:82 +0x59
github.com/nspcc-dev/neo-go/pkg/consensus.(*service).Start(0xc000152160)
        /home/rik/dev/neo-go/pkg/consensus/consensus.go:191 +0x56
github.com/nspcc-dev/neo-go/pkg/network.(*Server).tryStartConsensus(0xc000235040)
        /home/rik/dev/neo-go/pkg/network/server.go:311 +0xda
github.com/nspcc-dev/neo-go/pkg/network.(*Server).Start(0xc000235040, 0xc0000faba0)
        /home/rik/dev/neo-go/pkg/network/server.go:173 +0x202
created by github.com/nspcc-dev/neo-go/cli.newTestChain
        /home/rik/dev/neo-go/cli/executor_test.go:77 +0x47d
FAIL    github.com/nspcc-dev/neo-go/cli 14.479s
2020-09-19 21:49:05 +03:00
..
compiler Merge pull request #1375 from nspcc-dev/compiler/types 2020-09-16 14:43:50 +03:00
config *: use proper YAML library import path, fix #1306 2020-08-12 16:31:06 +03:00
consensus consensus: wait goroutine to finish on Shutdown 2020-09-19 21:49:05 +03:00
core Merge pull request #1378 from nspcc-dev/tests/cli 2020-09-19 17:02:34 +03:00
crypto hash: introduce memory-optimized merkle root hash calculation routine 2020-09-15 18:38:15 +03:00
encoding remove github.com/pkg/errors from dependencies 2020-08-07 12:21:52 +03:00
internal hash: introduce memory-optimized merkle root hash calculation routine 2020-09-15 18:38:15 +03:00
interop Merge pull request #1375 from nspcc-dev/compiler/types 2020-09-16 14:43:50 +03:00
io always wrap errors when creating new ones with fmt.Errorf() 2020-08-07 12:21:52 +03:00
network network: fix datarace in TCPTransport 2020-09-18 12:07:02 +03:00
rpc Merge pull request #1378 from nspcc-dev/tests/cli 2020-09-19 17:02:34 +03:00
smartcontract rpc: use state.AppExecResult for ApplicationLog marshalling 2020-09-07 13:38:32 +03:00
util *: use proper YAML library import path, fix #1306 2020-08-12 16:31:06 +03:00
vm vm/core: drop old key caching system 2020-09-10 14:43:24 +03:00
wallet cli: add tests for wallet import-deployed 2020-09-18 12:07:02 +03:00