core: shutdown Blockchain gracefully in tests
This commit is contained in:
parent
3a5224344e
commit
66f96e3f32
2 changed files with 2 additions and 0 deletions
|
@ -15,6 +15,7 @@ import (
|
|||
|
||||
func TestAddHeaders(t *testing.T) {
|
||||
bc := newTestChain(t)
|
||||
defer bc.Close()
|
||||
lastBlock := bc.topBlock.Load().(*block.Block)
|
||||
h1 := newBlock(bc.config, 1, lastBlock.Hash()).Header()
|
||||
h2 := newBlock(bc.config, 2, h1.Hash()).Header()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue