Skip to content

Commit 4d6d507

Browse files
authored
Merge pull request #135 from getamis/feature/nil-proposal
consensus/istanbul: make sure we have right proposal when starting Istanbul core
2 parents e17a336 + 0b088d1 commit 4d6d507

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

consensus/istanbul/backend/engine.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,8 +559,10 @@ func (sb *backend) Start(chain consensus.ChainReader, inserter func(types.Blocks
559559
}
560560
lastProposer = p
561561
}
562-
block := chain.GetBlock(curHeader.Hash(), lastSequence.Uint64())
563-
if err := sb.core.Start(lastSequence, lastProposer, block); err != nil {
562+
// We don't need block body so we create a header only block.
563+
// The proposal is only for validator set calculation.
564+
lastProposal := types.NewBlockWithHeader(curHeader)
565+
if err := sb.core.Start(lastSequence, lastProposer, lastProposal); err != nil {
564566
return err
565567
}
566568
sb.coreStarted = true

0 commit comments

Comments
 (0)