core: shutdown Blockchain gracefully in tests

This commit is contained in:
Evgenii Stratonikov 2020-02-29 17:53:28 +03:00
parent 3a5224344e
commit 66f96e3f32
2 changed files with 2 additions and 0 deletions

View file

@ -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()

View file

@ -14,6 +14,7 @@ import (
// https://github.com/neo-project/neo/blob/master-2.x/neo.UnitTests/UT_InteropPrices.cs#L245
func TestGetPrice(t *testing.T) {
bc := newTestChain(t)
defer bc.Close()
systemInterop := bc.newInteropContext(trigger.Application, storage.NewMemoryStore(), nil, nil)
v := bc.spawnVMWithInterops(systemInterop)