@ -92,6 +92,7 @@ var (
// consensusValidFlags are flags that are effective
consensusValidFlags = [ ] cli . Flag {
consensusMinPeersFlag ,
consensusAggregateSigFlag ,
legacyConsensusMinPeersFlag ,
}
@ -746,6 +747,11 @@ var (
DefValue : defaultConsensusConfig . MinPeers ,
Hidden : true ,
}
consensusAggregateSigFlag = cli . BoolFlag {
Name : "consensus.aggregate-sig" ,
Usage : "(multi-key) aggregate bls signatures before sending" ,
DefValue : defaultConsensusConfig . AggregateSig ,
}
legacyDelayCommitFlag = cli . StringFlag {
Name : "delay_commit" ,
Usage : "how long to delay sending commit messages in consensus, ex: 500ms, 1s" ,
@ -766,7 +772,7 @@ var (
)
func applyConsensusFlags ( cmd * cobra . Command , config * harmonyConfig ) {
if cli . HasFlagsChanged ( cmd , consensusValidFlags ) {
if config . Consensus == nil && c li . HasFlagsChanged ( cmd , consensusValidFlags ) {
cfg := getDefaultConsensusConfigCopy ( )
config . Consensus = & cfg
}
@ -776,6 +782,10 @@ func applyConsensusFlags(cmd *cobra.Command, config *harmonyConfig) {
} else if cli . IsFlagChanged ( cmd , legacyConsensusMinPeersFlag ) {
config . Consensus . MinPeers = cli . GetIntFlagValue ( cmd , legacyConsensusMinPeersFlag )
}
if cli . IsFlagChanged ( cmd , consensusAggregateSigFlag ) {
config . Consensus . AggregateSig = cli . GetBoolFlagValue ( cmd , consensusAggregateSigFlag )
}
}
// transaction pool flags