diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-08-07 20:47:25 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2017-08-07 21:00:47 +0800 |
commit | 2b50367fe938e603a5f9d3a525e0cdfa000f402e (patch) | |
tree | c032258a82131d9d3bacbe309682249c2430d6c9 /core/genesis_test.go | |
parent | 46cf0a616b597dfb8b1feff80ad58b6eb81e57d5 (diff) | |
download | dexon-2b50367fe938e603a5f9d3a525e0cdfa000f402e.tar.gz dexon-2b50367fe938e603a5f9d3a525e0cdfa000f402e.tar.zst dexon-2b50367fe938e603a5f9d3a525e0cdfa000f402e.zip |
core: fix blockchain goroutine leaks in tests
Diffstat (limited to 'core/genesis_test.go')
-rw-r--r-- | core/genesis_test.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/genesis_test.go b/core/genesis_test.go index bc82fe54e..8b193759f 100644 --- a/core/genesis_test.go +++ b/core/genesis_test.go @@ -120,6 +120,8 @@ func TestSetupGenesis(t *testing.T) { // Advance to block #4, past the homestead transition block of customg. genesis := oldcustomg.MustCommit(db) bc, _ := NewBlockChain(db, oldcustomg.Config, ethash.NewFullFaker(), new(event.TypeMux), vm.Config{}) + defer bc.Stop() + bc.SetValidator(bproc{}) bc.InsertChain(makeBlockChainWithDiff(genesis, []int{2, 3, 4, 5}, 0)) bc.CurrentBlock() |