log "github.com/sirupsen/logrus"
"github.com/vapor/config"
+ "github.com/vapor/event"
"github.com/vapor/protocol/bc"
"github.com/vapor/protocol/bc/types"
"github.com/vapor/protocol/state"
}
// NewChain returns a new Chain using store as the underlying storage.
-func NewChain(store Store, txPool *TxPool) (*Chain, error) {
+func NewChain(store Store, txPool *TxPool, eventDispatcher *event.Dispatcher) (*Chain, error) {
c := &Chain{
orphanManage: NewOrphanManage(),
txPool: txPool,
c.bestNode = c.index.GetNode(storeStatus.Hash)
c.index.SetMainChain(c.bestNode)
- c.bbft = newBbft(store, c.index, c.orphanManage)
+ c.bbft = newBbft(store, c.index, c.orphanManage, eventDispatcher)
go c.blockProcesser()
return c, nil
}