core: add Close() to blockchainer, implement it to properly close chain

Before it the deferred function in Run() was actually never able to properly
close the Store, so we weren't synching the latest state to the disk.
This commit is contained in:
Roman Khimov 2019-11-07 20:47:48 +03:00
parent d33083e1e1
commit b05754deac
8 changed files with 50 additions and 23 deletions

View file

@ -15,6 +15,7 @@ type Blockchainer interface {
AddHeaders(...*Header) error
AddBlock(*Block) error
BlockHeight() uint32
Close()
HeaderHeight() uint32
GetBlock(hash util.Uint256) (*Block, error)
GetContractState(hash util.Uint160) *ContractState