X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=protocol%2Fprotocol.go;h=3782aee303ea900453d03e4536dbace8c788dee5;hb=db158dcf09436b003defd333f1a665e7e051d820;hp=7bd8518876195add4a01a49398941b3b0034662d;hpb=bab9415cf7ddc5eb606286f96365a7af6cc2b80e;p=bytom%2Fvapor.git diff --git a/protocol/protocol.go b/protocol/protocol.go index 7bd85188..3782aee3 100644 --- a/protocol/protocol.go +++ b/protocol/protocol.go @@ -6,7 +6,6 @@ import ( 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" @@ -25,7 +24,6 @@ type Chain struct { cond sync.Cond bestNode *state.BlockNode - engine engine.Engine } // NewChain returns a new Chain using store as the underlying storage. @@ -57,10 +55,6 @@ func NewChain(store Store, txPool *TxPool) (*Chain, error) { return c, nil } -func (c *Chain) SetConsensusEngine(engine engine.Engine) { - c.engine = engine -} - func (c *Chain) initChainStatus() error { genesisBlock := config.GenesisBlock() txStatus := bc.NewTransactionStatus() @@ -142,7 +136,7 @@ func (c *Chain) setState(node *state.BlockNode, view *state.UtxoViewpoint) error c.index.SetMainChain(node) c.bestNode = node - log.WithFields(log.Fields{"height": c.bestNode.Height, "hash": c.bestNode.Hash.String()}).Debug("chain best status has been update") + log.WithFields(log.Fields{"module": logModule, "height": c.bestNode.Height, "hash": c.bestNode.Hash.String()}).Debug("chain best status has been update") c.cond.Broadcast() return nil }