[consensus] fix fbftlog in lastMileBlockIter

pull/3435/head
Jacky Wang 4 years ago
parent e165c4d55c
commit 96bfb677a4
No known key found for this signature in database
GPG Key ID: 1085CE5F4FF5842C
  1. 3
      consensus/consensus_v2.go

@ -400,7 +400,7 @@ func (consensus *Consensus) Start(
// All blocks returned are guaranteed to pass the verification. // All blocks returned are guaranteed to pass the verification.
type LastMileBlockIter struct { type LastMileBlockIter struct {
blockCandidates []*types.Block blockCandidates []*types.Block
fbftLog FBFTLog fbftLog *FBFTLog
verify func(*types.Block) error verify func(*types.Block) error
curIndex int curIndex int
logger *zerolog.Logger logger *zerolog.Logger
@ -420,6 +420,7 @@ func (consensus *Consensus) GetLastMileBlockIter(bnStart uint64) (*LastMileBlock
} }
return &LastMileBlockIter{ return &LastMileBlockIter{
blockCandidates: blocks, blockCandidates: blocks,
fbftLog: consensus.FBFTLog,
verify: consensus.BlockVerifier, verify: consensus.BlockVerifier,
curIndex: 0, curIndex: 0,
logger: consensus.getLogger(), logger: consensus.getLogger(),

Loading…
Cancel
Save