diff --git a/context.go b/context.go index c98b688d..c580349c 100644 --- a/context.go +++ b/context.go @@ -344,9 +344,6 @@ func (c *Context[H]) CreatePreBlock() PreBlock[H] { if c.preBlock = c.MakePreHeader(); c.preBlock == nil { return nil } - if !c.hasAllTransactions() { - return nil - } txx := make([]Transaction[H], len(c.TransactionHashes)) diff --git a/dbft.go b/dbft.go index 4cb380d8..2ce20dc8 100644 --- a/dbft.go +++ b/dbft.go @@ -544,6 +544,9 @@ func (d *DBFT[H]) onPreCommit(msg ConsensusPayload[H]) { d.Logger.Info("received PreCommit", zap.Uint("validator", uint(msg.ValidatorIndex()))) d.extendTimer(4) + if !d.hasAllTransactions() { + return + } preBlock := d.CreatePreBlock() if preBlock != nil { pub := d.Validators[msg.ValidatorIndex()]