OSDN Git Service

Mov (#518)
[bytom/vapor.git] / protocol / store.go
index 808b289..b108ab8 100644 (file)
@@ -9,6 +9,7 @@ import (
        "github.com/bytom/vapor/protocol/state"
 )
 
+// predefine errors
 var (
        ErrNotFoundConsensusResult = errors.New("can't find the vote result by given sequence")
 )
@@ -27,6 +28,8 @@ type Store interface {
        GetMainChainHash(uint64) (*bc.Hash, error)
        GetBlockHashesByHeight(uint64) ([]*bc.Hash, error)
 
+       DeleteConsensusResult(uint64) error
+       DeleteBlock(*types.Block) error
        SaveBlock(*types.Block, *bc.TransactionStatus) error
        SaveBlockHeader(*types.BlockHeader) error
        SaveChainStatus(*types.BlockHeader, *types.BlockHeader, []*types.BlockHeader, *state.UtxoViewpoint, []*state.ConsensusResult) error