log "github.com/sirupsen/logrus"
"github.com/vapor/config"
+ engine "github.com/vapor/consensus/consensus"
"github.com/vapor/errors"
"github.com/vapor/protocol/bc"
"github.com/vapor/protocol/bc/types"
store Store
processBlockCh chan *processBlockMsg
- cond sync.Cond
- bestNode *state.BlockNode
- Authoritys map[string]string
- position uint64
+ cond sync.Cond
+ bestNode *state.BlockNode
+ engine engine.Engine
}
// NewChain returns a new Chain using store as the underlying storage.
return c, nil
}
-func (c *Chain) SetAuthoritys(authoritys map[string]string) {
- c.Authoritys = authoritys
-}
-
-func (c *Chain) SetPosition(position uint64) {
- c.position = position
+func (c *Chain) SetConsensusEngine(engine engine.Engine) {
+ c.engine = engine
}
func (c *Chain) initChainStatus() error {