Skip to content

Commit

Permalink
change jury signature num from cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
guo-li-hua committed Jul 7, 2021
1 parent b9d82fc commit 68b355f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions consensus/jury/election.go
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,8 @@ func (p *Processor) processElectionSigResultEvent(evt *ElectionSigResultEvent) e
if mel == nil || mel.nType != 1 {
return nil
}
if len(mel.sigs) >= p.dag.ChainThreshold() {
//if len(mel.sigs) >= p.dag.ChainThreshold() {
if len(mel.sigs) >= getSysCfgContractSignatureNum(p.dag) {
log.Debugf("[%s]processElectionSigResultEvent, sig number is enough", reqId.ShortStr())
return nil
}
Expand All @@ -473,8 +474,8 @@ func (p *Processor) processElectionSigResultEvent(evt *ElectionSigResultEvent) e
}
mel.sigs = append(mel.sigs, evt.Sig)
log.Debugf("[%s]processElectionSigResultEvent,sig num=%d, add sig[%s], Threshold=%d",
reqId.ShortStr(), len(mel.sigs), evt.Sig.String(), p.dag.ChainThreshold())
if len(mel.sigs) >= p.dag.ChainThreshold() {
reqId.ShortStr(), len(mel.sigs), evt.Sig.String(), getSysCfgContractSignatureNum(p.dag))
if len(mel.sigs) >= getSysCfgContractSignatureNum(p.dag) {
event := ContractEvent{
CType: CONTRACT_EVENT_EXEC,
Ele: p.mtx[reqId].eleNode,
Expand Down

0 comments on commit 68b355f

Please sign in to comment.