forked from TrueCloudLab/neoneo-go
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) {
|
func TestAddHeaders(t *testing.T) {
|
||||||
bc := newTestChain(t)
|
bc := newTestChain(t)
|
||||||
|
defer bc.Close()
|
||||||
lastBlock := bc.topBlock.Load().(*block.Block)
|
lastBlock := bc.topBlock.Load().(*block.Block)
|
||||||
h1 := newBlock(bc.config, 1, lastBlock.Hash()).Header()
|
h1 := newBlock(bc.config, 1, lastBlock.Hash()).Header()
|
||||||
h2 := newBlock(bc.config, 2, h1.Hash()).Header()
|
h2 := newBlock(bc.config, 2, h1.Hash()).Header()
|
||||||
|
|
|
@ -14,6 +14,7 @@ import (
|
||||||
// https://github.com/neo-project/neo/blob/master-2.x/neo.UnitTests/UT_InteropPrices.cs#L245
|
// https://github.com/neo-project/neo/blob/master-2.x/neo.UnitTests/UT_InteropPrices.cs#L245
|
||||||
func TestGetPrice(t *testing.T) {
|
func TestGetPrice(t *testing.T) {
|
||||||
bc := newTestChain(t)
|
bc := newTestChain(t)
|
||||||
|
defer bc.Close()
|
||||||
systemInterop := bc.newInteropContext(trigger.Application, storage.NewMemoryStore(), nil, nil)
|
systemInterop := bc.newInteropContext(trigger.Application, storage.NewMemoryStore(), nil, nil)
|
||||||
|
|
||||||
v := bc.spawnVMWithInterops(systemInterop)
|
v := bc.spawnVMWithInterops(systemInterop)
|
||||||
|
|
Loading…
Reference in a new issue