-type bbft struct {
- consensusNodeManager *consensusNodeManager
- orphanManage *OrphanManage
- signatureCache *lru.Cache
- eventDispatcher *event.Dispatcher
-}
-
-func newBbft(store Store, blockIndex *state.BlockIndex, orphanManage *OrphanManage, eventDispatcher *event.Dispatcher) *bbft {
- return &bbft{
- orphanManage: orphanManage,
- consensusNodeManager: newConsensusNodeManager(store, blockIndex),
- signatureCache: lru.New(maxSignatureCacheSize),
- eventDispatcher: eventDispatcher,
- }
-}
-
-func (b *bbft) isIrreversible(block *types.Block) bool {
- consensusNodes, err := b.consensusNodeManager.getConsensusNodesByVoteResult(&block.PreviousBlockHash)
+func (c *Chain) isIrreversible(block *types.Block) bool {
+ consensusNodes, err := c.consensusNodeManager.getConsensusNodesByVoteResult(&block.PreviousBlockHash)