consensus: use dbft.M() for new block witness

We're collecting dbft.M() number of signatures in getBlockWitness(), so we
should use the same value for M here.
This commit is contained in:
Roman Khimov 2020-08-10 18:49:48 +03:00
parent fb97ea9458
commit 80302c5c07

View file

@ -518,7 +518,7 @@ func (s *service) newBlockFromContext(ctx *dbft.Context) block.Block {
if err != nil {
return nil
}
script, err := smartcontract.CreateMultiSigRedeemScript(len(validators)-(len(validators)-1)/3, validators)
script, err := smartcontract.CreateMultiSigRedeemScript(s.dbft.Context.M(), validators)
if err != nil {
return nil
}